aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/WebSocket
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-13 11:02:40 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-13 11:02:40 -0400
commit1591558fc000f4330744a31e934c87cb5e4bb2c4 (patch)
tree2b619418391a97896a34a47160333bc1cc788241 /MediaBrowser.Server.Implementations/WebSocket
parentef6c513ede7203f7b03490c44a222dfaf8311eac (diff)
fixes #526 - Make server startup error message friendlier
Diffstat (limited to 'MediaBrowser.Server.Implementations/WebSocket')
-rw-r--r--MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs b/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
index 797c4a80c..6649fd197 100644
--- a/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
+++ b/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
@@ -4,6 +4,7 @@ using MediaBrowser.Common.Net;
using MediaBrowser.Model.Logging;
using System;
using System.Net;
+using System.Net.Sockets;
namespace MediaBrowser.Server.Implementations.WebSocket
{
@@ -60,7 +61,16 @@ namespace MediaBrowser.Server.Implementations.WebSocket
TimeOut = TimeSpan.FromHours(12)
};
- WebSocketServer.Start();
+ try
+ {
+ WebSocketServer.Start();
+ }
+ catch (SocketException ex)
+ {
+ _logger.ErrorException("The web socket server is unable to start on port {0} due to a Socket error. This can occasionally happen when the operating system takes longer than usual to release the IP bindings from the previous session. This can take up to five minutes. Please try waiting or rebooting the system.", ex, portNumber);
+
+ throw;
+ }
Port = portNumber;