aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-16 12:47:14 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-03-16 12:47:14 -0400
commitf988539e13e9f0a4bc206d2b6803520a35b7228e (patch)
treecdcaed37811773497678813a56453e6cc5de083f /MediaBrowser.Server.Implementations/Session/SessionManager.cs
parent3c92842bce81e138f55876f53499642f79f399ce (diff)
update session listener
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index 76e97ff48..8a21ed6bd 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -1687,16 +1687,11 @@ namespace MediaBrowser.Server.Implementations.Session
AccessToken = token
});
- if (result.Items.Length == 0)
- {
- return null;
- }
-
- var info = result.Items[0];
+ var info = result.Items.FirstOrDefault();
if (info == null)
{
- return null;
+ return Task.FromResult<SessionInfo>(null);
}
return GetSessionByAuthenticationToken(info, deviceId, remoteEndpoint, null);