mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-23 14:10:40 +02:00
add mono check
This commit is contained in:
parent
d091fe0e6e
commit
ad6f47329f
|
@ -161,6 +161,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.NetListener
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
private async Task ProcessWebSocketRequest(HttpListenerContext ctx)
|
private async Task ProcessWebSocketRequest(HttpListenerContext ctx)
|
||||||
{
|
{
|
||||||
|
#if !__MonoCS__
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var webSocketContext = await ctx.AcceptWebSocketAsync(null).ConfigureAwait(false);
|
var webSocketContext = await ctx.AcceptWebSocketAsync(null).ConfigureAwait(false);
|
||||||
|
@ -180,6 +181,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.NetListener
|
||||||
ctx.Response.StatusCode = 500;
|
ctx.Response.StatusCode = 500;
|
||||||
ctx.Response.Close();
|
ctx.Response.Close();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleError(Exception ex, HttpListenerContext context)
|
private void HandleError(Exception ex, HttpListenerContext context)
|
||||||
|
|
Loading…
Reference in a new issue