mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
change manual reset event
This commit is contained in:
parent
e4e4865f7c
commit
8d20621e19
@ -15,7 +15,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
|||||||
public class WebSocketSharpListener : IHttpListener
|
public class WebSocketSharpListener : IHttpListener
|
||||||
{
|
{
|
||||||
private HttpListener _listener;
|
private HttpListener _listener;
|
||||||
private readonly ManualResetEventSlim _listenForNextRequest = new ManualResetEventSlim(false);
|
private readonly ManualResetEvent _listenForNextRequest = new ManualResetEvent(false);
|
||||||
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly Action<string> _endpointListener;
|
private readonly Action<string> _endpointListener;
|
||||||
@ -64,7 +64,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_listener.BeginGetContext(ListenerCallback, _listener);
|
_listener.BeginGetContext(ListenerCallback, _listener);
|
||||||
_listenForNextRequest.Wait();
|
_listenForNextRequest.WaitOne();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user