Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.1pre
-
None
-
None
Description
<p>If the HttpServer fails to start correctly it will cause a deadlock during client shut down.</p>
<p>When stopping the HttpServer it <a href="https://github.com/MediaPortal/MediaPortal-2/blob/WIP_2.1_Pre2/MediaPortal/Source/Core/HttpServer/HttpListenerBase.cs#L246">waits for an event to be set</a>. This event is <a href="https://github.com/MediaPortal/MediaPortal-2/blob/WIP_2.1_Pre2/MediaPortal/Source/Core/HttpServer/HttpListenerBase.cs#L145">never set</a> if the underlying TcpListener hasn't been started, e.g. due to an exception.</p>
<p>When stopping the HttpServer it <a href="https://github.com/MediaPortal/MediaPortal-2/blob/WIP_2.1_Pre2/MediaPortal/Source/Core/HttpServer/HttpListenerBase.cs#L246">waits for an event to be set</a>. This event is <a href="https://github.com/MediaPortal/MediaPortal-2/blob/WIP_2.1_Pre2/MediaPortal/Source/Core/HttpServer/HttpListenerBase.cs#L145">never set</a> if the underlying TcpListener hasn't been started, e.g. due to an exception.</p>