aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-09 21:47:52 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-09 21:47:52 -0400
commita11c4d0b0872096dadcedc321d600c5e4d31db90 (patch)
tree941f963caab328bc2c33031df5099cf0dc090c96
parent7fdc6e7e9128bccf70a1bc8bc060afe344c8fcf0 (diff)
fix null reference in web socket connection
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
index 72ec16f85..7cbff9768 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -99,6 +99,10 @@ namespace MediaBrowser.Server.Implementations.Session
private Task<SessionInfo> GetSession(NameValueCollection queryString, string remoteEndpoint)
{
var token = queryString["api_key"];
+ if (string.IsNullOrWhiteSpace(token))
+ {
+ return Task.FromResult<SessionInfo>(null);
+ }
return _sessionManager.GetSessionByAuthenticationToken(token, remoteEndpoint);
}