aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-30 12:08:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-30 12:08:46 -0400
commit0619717f38a26879b08d18029c86847e88b3df8d (patch)
treed71e1a14d2a3f7990203dd3e0e9ebefb95865d71
parent1ef5c88fc20d2c84c6a50a7a27aedd41ba3891e2 (diff)
ignore socket error
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs5
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs7
2 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index 77843ef6b..0dabcac4b 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -1748,6 +1748,11 @@ namespace MediaBrowser.Server.Implementations.Session
public void ReportNowViewingItem(string sessionId, string itemId)
{
+ if (string.IsNullOrWhiteSpace(itemId))
+ {
+ throw new ArgumentNullException("itemId");
+ }
+
var item = _libraryManager.GetItemById(new Guid(itemId));
var info = GetItemInfo(item, null, null);
diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
index 602bc4876..ddd7ba53a 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs
@@ -230,7 +230,12 @@ namespace MediaBrowser.Server.Implementations.Session
{
var vals = message.Data.Split('|');
- _sessionManager.ReportNowViewingItem(session.Id, vals[1]);
+ var itemId = vals[1];
+
+ if (!string.IsNullOrWhiteSpace(itemId))
+ {
+ _sessionManager.ReportNowViewingItem(session.Id, itemId);
+ }
}
}