aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-12-27 15:20:27 +0100
committerBond_009 <bond.009@outlook.com>2020-01-13 20:06:08 +0100
commit8865b3ea3d0af201c37aa129016b843f0b9fe686 (patch)
tree186d7f531ea150cfa20ae06fafcda6893a153845 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
parent4d311870d2f40f67da6df5641b53df637fdee88d (diff)
Remove dead code and improve logging
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index ebae4d0b1..3cdb0ecae 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -520,7 +520,7 @@ namespace Emby.Server.Implementations.HttpServer
try
{
- _logger.LogInformation("WS Request from {IP}", context.Connection.RemoteIpAddress);
+ _logger.LogInformation("WS {IP} request", context.Connection.RemoteIpAddress);
WebSocket webSocket = await context.WebSockets.AcceptWebSocketAsync().ConfigureAwait(false);
@@ -536,11 +536,11 @@ namespace Emby.Server.Implementations.HttpServer
WebSocketConnected?.Invoke(this, new GenericEventArgs<IWebSocketConnection>(connection));
await connection.ProcessAsync().ConfigureAwait(false);
- _logger.LogInformation("WS closed from {IP}", context.Connection.RemoteIpAddress);
+ _logger.LogInformation("WS {IP} closed", context.Connection.RemoteIpAddress);
}
catch (Exception ex) // Otherwise ASP.Net will ignore the exception
{
- _logger.LogError(ex, "WebSocketRequestHandler error");
+ _logger.LogError(ex, "WS {IP} WebSocketRequestHandler error");
if (!context.Response.HasStarted)
{
context.Response.StatusCode = 500;
@@ -705,8 +705,6 @@ namespace Emby.Server.Implementations.HttpServer
return Task.CompletedTask;
}
- _logger.LogDebug("Websocket message received: {0}", result.MessageType);
-
IEnumerable<Task> GetTasks()
{
foreach (var x in _webSocketListeners)