Minor code improvement

This commit is contained in:
Jordan Brown
2020-07-14 10:49:03 -04:00
parent fece7567fb
commit e01aedee03
@@ -122,10 +122,8 @@ namespace Tgstation.Server.Host.Components.Session
{
SocketExtensions.BindTest(port);
}
catch (SocketException ex)
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.AddressAlreadyInUse)
{
if(ex.SocketErrorCode != SocketError.AddressAlreadyInUse)
throw;
throw new JobException(ErrorCode.DreamDaemonPortInUse, ex);
}
}