Only throw error code 78 on correct socket error

This commit is contained in:
Jordan Brown
2020-07-11 09:48:03 -04:00
parent 5432ae41cc
commit d900eaf71a
@@ -124,8 +124,10 @@ namespace Tgstation.Server.Host.Components.Session
{
socket.Bind(new IPEndPoint(IPAddress.Any, port));
}
catch (Exception ex)
catch (SocketException ex)
{
if(ex.SocketErrorCode != SocketError.AddressAlreadyInUse)
throw;
throw new JobException(ErrorCode.DreamDaemonPortInUse, ex);
}
}