diff options
| author | oledfish <88390729+oledfish@users.noreply.github.com> | 2022-01-16 21:33:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 21:33:18 -0300 |
| commit | 3b075a58027be4a2a3bdf662c70934f6cafafe87 (patch) | |
| tree | b4c226f25f843c3f2685c92e1edc3b3999716d34 /Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | |
| parent | 86a5e72a65df638df2cde349ccd2ad8c5d40f88c (diff) | |
| parent | ef0708d876434a99ec647473c37295fab45a35fb (diff) | |
Merge branch 'jellyfin:master' into additional-episode-orders
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketConnection.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs index 7010a6fb0..b87f1bc22 100644 --- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs +++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs @@ -42,17 +42,14 @@ namespace Emby.Server.Implementations.HttpServer /// <param name="logger">The logger.</param> /// <param name="socket">The socket.</param> /// <param name="remoteEndPoint">The remote end point.</param> - /// <param name="query">The query.</param> public WebSocketConnection( ILogger<WebSocketConnection> logger, WebSocket socket, - IPAddress? remoteEndPoint, - IQueryCollection query) + IPAddress? remoteEndPoint) { _logger = logger; _socket = socket; RemoteEndPoint = remoteEndPoint; - QueryString = query; _jsonOptions = JsonDefaults.Options; LastActivityDate = DateTime.Now; @@ -82,12 +79,6 @@ namespace Emby.Server.Implementations.HttpServer public DateTime LastKeepAliveDate { get; set; } /// <summary> - /// Gets the query string. - /// </summary> - /// <value>The query string.</value> - public IQueryCollection QueryString { get; } - - /// <summary> /// Gets the state. /// </summary> /// <value>The state.</value> @@ -96,7 +87,7 @@ namespace Emby.Server.Implementations.HttpServer /// <summary> /// Sends a message asynchronously. /// </summary> - /// <typeparam name="T"></typeparam> + /// <typeparam name="T">The type of the message.</typeparam> /// <param name="message">The message.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task.</returns> @@ -150,8 +141,8 @@ namespace Emby.Server.Implementations.HttpServer { await ProcessInternal(pipe.Reader).ConfigureAwait(false); } - } while ( - (_socket.State == WebSocketState.Open || _socket.State == WebSocketState.Connecting) + } + while ((_socket.State == WebSocketState.Open || _socket.State == WebSocketState.Connecting) && receiveresult.MessageType != WebSocketMessageType.Close); Closed?.Invoke(this, EventArgs.Empty); @@ -180,7 +171,7 @@ namespace Emby.Server.Implementations.HttpServer } WebSocketMessage<object>? stub; - long bytesConsumed = 0; + long bytesConsumed; try { stub = DeserializeWebSocketMessage(buffer, out bytesConsumed); @@ -236,7 +227,8 @@ namespace Emby.Server.Implementations.HttpServer { MessageId = Guid.NewGuid(), MessageType = SessionMessageType.KeepAlive - }, CancellationToken.None); + }, + CancellationToken.None); } /// <inheritdoc /> |
