aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-04 15:48:31 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-04 15:48:31 -0400
commitc9345179db5ff8e3f681666ce063bb7a028fff84 (patch)
tree116e7010ee6dc99437d3f1cb4fdd2119d26be77d /MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
parentfe2eb6cb01564662df01aef87afe2bff51971c1b (diff)
fix ambiguous method call
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
index 399cce945..41cb7eb6b 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -95,17 +95,23 @@ namespace MediaBrowser.Server.Implementations.Session
var version = vals[2];
var deviceName = vals.Length > 3 ? vals[3] : string.Empty;
- if (!string.IsNullOrEmpty(deviceName))
- {
- _logger.Debug("Logging session activity");
- await _sessionManager.LogSessionActivity(client, version, deviceId, deviceName, null).ConfigureAwait(false);
- }
-
var session = _sessionManager.Sessions
.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
string.Equals(i.Client, client) &&
string.Equals(i.ApplicationVersion, version));
+ if (session == null && !string.IsNullOrEmpty(deviceName))
+ {
+ _logger.Debug("Logging session activity");
+
+ await _sessionManager.LogSessionActivity(client, version, deviceId, deviceName, null).ConfigureAwait(false);
+
+ session = _sessionManager.Sessions
+ .FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
+ string.Equals(i.Client, client) &&
+ string.Equals(i.ApplicationVersion, version));
+ }
+
if (session != null)
{
var controller = new WebSocketController(session, _appHost);