fix race condition with socket binding

This commit is contained in:
Deathmax 2011-07-09 23:11:07 +08:00
parent 1fca9b6860
commit c3fdff890a

View file

@ -79,7 +79,8 @@ namespace TShockAPI
private static void Listener()
{
listener = new UdpClient(ListenPort);
if (listener == null)
listener = new UdpClient(ListenPort);
while (ContinueServer)
{
try