aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-04 12:15:44 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-04 12:15:44 -0400
commit0d72696bf49dde9bd5b810fde17964c6e4afc82c (patch)
treefecbc5ca32d63e4bd30b61ac68e77a2431faf4b9 /MediaBrowser.Server.Implementations/Session
parent3640f620863e4947a07ad6ebbf54ab6427534b38 (diff)
restored people editing
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session')
-rw-r--r--MediaBrowser.Server.Implementations/Session/HttpSessionController.cs10
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs10
2 files changed, 14 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs b/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs
index a3a6d3630..1be4eca23 100644
--- a/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs
+++ b/MediaBrowser.Server.Implementations/Session/HttpSessionController.cs
@@ -42,6 +42,14 @@ namespace MediaBrowser.Server.Implementations.Session
ResetPingTimer();
}
+ private string PostUrl
+ {
+ get
+ {
+ return string.Format("http://{0}{1}", Session.RemoteEndPoint, _postUrl);
+ }
+ }
+
public bool IsSessionActive
{
get
@@ -97,7 +105,7 @@ namespace MediaBrowser.Server.Implementations.Session
Dictionary<string, string> args,
CancellationToken cancellationToken)
{
- var url = _postUrl + "/" + name + ToQueryString(args);
+ var url = PostUrl + "/" + name + ToQueryString(args);
await _httpClient.Post(new HttpRequestOptions
{
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index cbf14076b..a33db0c13 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -1,5 +1,4 @@
-using System.IO;
-using MediaBrowser.Common.Events;
+using MediaBrowser.Common.Events;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller;
@@ -22,6 +21,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
+using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -983,6 +983,8 @@ namespace MediaBrowser.Server.Implementations.Session
/// <returns>Task.</returns>
public Task SendServerRestartNotification(CancellationToken cancellationToken)
{
+ _logger.Debug("Beginning SendServerRestartNotification");
+
var sessions = Sessions.Where(i => i.IsActive && i.SessionController != null).ToList();
var tasks = sessions.Select(session => Task.Run(async () =>
@@ -1171,13 +1173,11 @@ namespace MediaBrowser.Server.Implementations.Session
if (!string.IsNullOrWhiteSpace(capabilities.MessageCallbackUrl))
{
- var postUrl = string.Format("http://{0}{1}", session.RemoteEndPoint, capabilities.MessageCallbackUrl);
-
var controller = session.SessionController as HttpSessionController;
if (controller == null)
{
- session.SessionController = new HttpSessionController(_httpClient, _jsonSerializer, session, postUrl, this);
+ session.SessionController = new HttpSessionController(_httpClient, _jsonSerializer, session, capabilities.MessageCallbackUrl, this);
}
}