diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/Security/SessionContext.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/SocketSharp/SharpWebSocket.cs | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/SessionContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/SessionContext.cs index 1bbe9893b..f40d117c4 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/SessionContext.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/SessionContext.cs @@ -25,11 +25,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security { var authorization = _authContext.GetAuthorizationInfo(requestContext); - if (!string.IsNullOrWhiteSpace(authorization.Token)) - { - var auth = GetTokenInfo(requestContext); - return _sessionManager.GetSessionByAuthenticationToken(auth, authorization.DeviceId, requestContext.RemoteIp, authorization.Version); - } + //if (!string.IsNullOrWhiteSpace(authorization.Token)) + //{ + // var auth = GetTokenInfo(requestContext); + // if (auth != null) + // { + // return _sessionManager.GetSessionByAuthenticationToken(auth, authorization.DeviceId, requestContext.RemoteIp, authorization.Version); + // } + //} var session = _sessionManager.GetSession(authorization.DeviceId, authorization.Client, authorization.Version); return Task.FromResult(session); diff --git a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/SharpWebSocket.cs b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/SharpWebSocket.cs index 8ab8b0215..a8b3bc10b 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/SharpWebSocket.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/SharpWebSocket.cs @@ -56,7 +56,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp void socket_OnError(object sender, SocketHttpListener.ErrorEventArgs e) { - EventHelper.FireEventIfNotNull(Closed, this, EventArgs.Empty, _logger); + _logger.Error("Error in SharpWebSocket: {0}", e.Message ?? string.Empty); + //EventHelper.FireEventIfNotNull(Closed, this, EventArgs.Empty, _logger); } void socket_OnClose(object sender, SocketHttpListener.CloseEventArgs e) |
