mirror of
https://github.com/Impostor/Impostor.git
synced 2026-10-20 01:46:11 +00:00
Fixes #128 - MacOS does not support "DontFragment"
This commit is contained in:
1 parent
57cce72df5
commit
b3fa60f798
2 files changed
+18
-8
No files matched your search
@@ -38,10 +38,15 @@ namespace Impostor.Server.Net.Redirector
|
||||
|
||||
_logger.LogWarning("Node server will send updates to {0}.", endpoint);
|
||||
_server = endpoint;
|
||||
_client = new UdpClient
|
||||
_client = new UdpClient();
|
||||
|
||||
try
|
||||
{
|
||||
DontFragment = true
|
||||
};
|
||||
_client.DontFragment = true;
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,4 +131,4 @@ namespace Impostor.Server.Net.Redirector
|
||||
public bool Expired => LastUpdated < DateTimeOffset.UtcNow.AddHours(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,10 +30,15 @@ namespace Impostor.Server.Net.Redirector
|
||||
throw new ArgumentException("UdpMasterEndpoint should be in the ip:port format.");
|
||||
}
|
||||
|
||||
_client = new UdpClient(endpoint)
|
||||
_client = new UdpClient(endpoint);
|
||||
|
||||
try
|
||||
{
|
||||
DontFragment = true,
|
||||
};
|
||||
_client.DontFragment = true;
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
@@ -93,4 +98,4 @@ namespace Impostor.Server.Net.Redirector
|
||||
_logger.LogWarning("Master server node update listener is stopping.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user