mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
fix socket errors on linux under .net core
This commit is contained in:
parent
dcd06597a7
commit
524e7facc8
6 changed files with 39 additions and 54 deletions
|
|
@ -102,11 +102,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
|||
/// <returns>Task.</returns>
|
||||
public Task SendAsync(byte[] bytes, bool endOfMessage, CancellationToken cancellationToken)
|
||||
{
|
||||
var completionSource = new TaskCompletionSource<bool>();
|
||||
|
||||
WebSocket.SendAsync(bytes, res => completionSource.TrySetResult(true));
|
||||
|
||||
return completionSource.Task;
|
||||
return WebSocket.SendAsync(bytes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -118,11 +114,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
|||
/// <returns>Task.</returns>
|
||||
public Task SendAsync(string text, bool endOfMessage, CancellationToken cancellationToken)
|
||||
{
|
||||
var completionSource = new TaskCompletionSource<bool>();
|
||||
|
||||
WebSocket.SendAsync(text, res => completionSource.TrySetResult(true));
|
||||
|
||||
return completionSource.Task;
|
||||
return WebSocket.SendAsync(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue