Fix some warnings

This commit is contained in:
Bond-009
2019-10-25 12:47:20 +02:00
committed by Bond_009
parent 7846e9cb3c
commit b477b3874e
48 changed files with 128 additions and 100 deletions

View File

@@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.SocketSharp
}
/// <summary>
/// Gets or sets the state.
/// Gets the state.
/// </summary>
/// <value>The state.</value>
public WebSocketState State => _webSocket.State;

View File

@@ -81,8 +81,10 @@ namespace Emby.Server.Implementations.SocketSharp
if (webSocketContext.State == WebSocketState.Open)
{
await webSocketContext.CloseAsync(result.CloseStatus ?? WebSocketCloseStatus.NormalClosure,
result.CloseStatusDescription, _disposeCancellationToken);
await webSocketContext.CloseAsync(
result.CloseStatus ?? WebSocketCloseStatus.NormalClosure,
result.CloseStatusDescription,
_disposeCancellationToken).ConfigureAwait(false);
}
socket.Dispose();

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Linq;
using MediaBrowser.Common.Net;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
@@ -13,7 +12,7 @@ using IHttpRequest = MediaBrowser.Model.Services.IHttpRequest;
namespace Emby.Server.Implementations.SocketSharp
{
public partial class WebSocketSharpRequest : IHttpRequest
public class WebSocketSharpRequest : IHttpRequest
{
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
public const string MultiPartFormData = "multipart/form-data";