aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-17 17:23:48 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-17 17:23:48 -0400
commitca5989cb17b324ee481b92ddf3cd1ea47af85cbe (patch)
tree7ec185780257329779df94d7ec915c61bdc99ee8 /MediaBrowser.Server.Implementations/Session
parent715119b525a026f0f60c9dcaae1d4899cbc6bcda (diff)
fix channel query by category
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session')
-rw-r--r--MediaBrowser.Server.Implementations/Session/WebSocketController.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
index 6f4dd0a72..05eef611f 100644
--- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
+++ b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
@@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Session
{
- public class WebSocketController : ISessionController
+ public class WebSocketController : ISessionController, IDisposable
{
public SessionInfo Session { get; private set; }
public IReadOnlyList<IWebSocketConnection> Sockets { get; private set; }
@@ -244,5 +244,13 @@ namespace MediaBrowser.Server.Implementations.Session
return Task.WhenAll(tasks);
}
+
+ public void Dispose()
+ {
+ foreach (var socket in Sockets.ToList())
+ {
+ socket.Closed -= connection_Closed;
+ }
+ }
}
}