diff --git a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs index 1e95d1a1f5..8a2a40e28c 100644 --- a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs +++ b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs @@ -217,7 +217,6 @@ namespace Tgstation.Server.Host.Components.Session if (!launchParameters.Port.HasValue) throw new InvalidOperationException("Given port is null!"); - PortBindTest(launchParameters.Port.Value); switch (dmbProvider.CompileJob.MinimumSecurityLevel) { case DreamDaemonSecurity.Ultrasafe: @@ -255,8 +254,7 @@ namespace Tgstation.Server.Host.Components.Session if (dmbProvider.EngineVersion.Engine.Value == EngineType.Byond) await CheckPagerIsNotRunning(); - if (platformIdentifier.IsWindows) - await asyncDelayer.Delay(TimeSpan.FromMilliseconds(500), cancellationToken); // Server can trip after we bind tested the port + PortBindTest(launchParameters.Port.Value); string outputFilePath = null; var preserveLogFile = true; diff --git a/src/Tgstation.Server.Host/Extensions/SocketExtensions.cs b/src/Tgstation.Server.Host/Extensions/SocketExtensions.cs index a9e6a97532..28c94f0ba2 100644 --- a/src/Tgstation.Server.Host/Extensions/SocketExtensions.cs +++ b/src/Tgstation.Server.Host/Extensions/SocketExtensions.cs @@ -23,6 +23,7 @@ namespace Tgstation.Server.Host.Extensions ProtocolType.Tcp); socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ExclusiveAddressUse, true); socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); + socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true); if (includeIPv6) socket.DualMode = true;