diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-09-14 20:39:24 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-09-14 20:39:24 -0400 |
| commit | 5abbc841222edd4e48b72af05fe6a1caa64bf064 (patch) | |
| tree | f45de338d1a68f5ca95f14054cb112124f58c41c /MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs | |
| parent | 5f87d57381a89fcbd74335d8395391a79cbdec16 (diff) | |
update web socket sharp
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs index c91785111..9deb34e91 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs @@ -78,6 +78,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp // Handle the processing of a request in here. private void ListenerCallback(IAsyncResult asyncResult) { + _listenForNextRequest.Set(); + var listener = asyncResult.AsyncState as HttpListener; HttpListenerContext context; @@ -88,8 +90,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp { if (!isListening) { - _logger.Debug("Ignoring ListenerCallback() as HttpListener is no longer listening"); - return; + _logger.Debug("Ignoring ListenerCallback() as HttpListener is no longer listening"); return; } // The EndGetContext() method, as with all Begin/End asynchronous methods in the .NET Framework, // blocks until there is a request to be processed or some type of data is available. @@ -105,10 +106,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp _logger.Warn(errMsg); return; } - finally - { - _listenForNextRequest.Set(); - } Task.Factory.StartNew(() => InitTask(context)); } @@ -268,4 +265,4 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp } } } -} +}
\ No newline at end of file |
