diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-13 01:42:12 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-13 01:42:12 -0400 |
| commit | 6623fe10ee1f74cafc8fadf8caa531178a0b26fe (patch) | |
| tree | 357930371449d41e97b44a6182767a02415ca79f | |
| parent | f98e42fc3b03640313ab520a0028afa60ccc2ebe (diff) | |
update server restart
| -rw-r--r-- | MediaBrowser.Server.Mono/MonoAppHost.cs | 2 | ||||
| -rw-r--r-- | SocketHttpListener/Net/EndPointListener.cs | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Mono/MonoAppHost.cs b/MediaBrowser.Server.Mono/MonoAppHost.cs index c94334e89..609497eed 100644 --- a/MediaBrowser.Server.Mono/MonoAppHost.cs +++ b/MediaBrowser.Server.Mono/MonoAppHost.cs @@ -25,7 +25,7 @@ namespace MediaBrowser.Server.Mono get { // A restart script must be provided - return StartupOptions.ContainsOption("-restartpath") && StartupOptions.ContainsOption("-ffmpeg"); + return StartupOptions.ContainsOption("-restartpath"); } } diff --git a/SocketHttpListener/Net/EndPointListener.cs b/SocketHttpListener/Net/EndPointListener.cs index 2b1479e42..48c0ae7cb 100644 --- a/SocketHttpListener/Net/EndPointListener.cs +++ b/SocketHttpListener/Net/EndPointListener.cs @@ -93,6 +93,15 @@ namespace SocketHttpListener.Net } } + try + { + sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); + } + catch (SocketException) + { + // This is not supported on all operating systems (qnap) + } + sock.Bind(endpoint); // This is the number TcpListener uses. |
