fix null reference in web socket connection
This commit is contained in:
parent
7fdc6e7e91
commit
a11c4d0b08
|
@ -99,6 +99,10 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||||
private Task<SessionInfo> GetSession(NameValueCollection queryString, string remoteEndpoint)
|
private Task<SessionInfo> GetSession(NameValueCollection queryString, string remoteEndpoint)
|
||||||
{
|
{
|
||||||
var token = queryString["api_key"];
|
var token = queryString["api_key"];
|
||||||
|
if (string.IsNullOrWhiteSpace(token))
|
||||||
|
{
|
||||||
|
return Task.FromResult<SessionInfo>(null);
|
||||||
|
}
|
||||||
return _sessionManager.GetSessionByAuthenticationToken(token, remoteEndpoint);
|
return _sessionManager.GetSessionByAuthenticationToken(token, remoteEndpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user