update server restart

This commit is contained in:
Luke Pulverenti 2017-10-13 01:42:12 -04:00
parent f98e42fc3b
commit 6623fe10ee
2 changed files with 10 additions and 1 deletions

View file

@ -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");
}
}

View file

@ -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.