From c3fdff890ad16ad857ea6e3fe39df7ded4f9207c Mon Sep 17 00:00:00 2001 From: Deathmax Date: Sat, 9 Jul 2011 23:11:07 +0800 Subject: [PATCH] fix race condition with socket binding --- TShockAPI/RconHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/RconHandler.cs b/TShockAPI/RconHandler.cs index 6a2ad060..909644dd 100644 --- a/TShockAPI/RconHandler.cs +++ b/TShockAPI/RconHandler.cs @@ -79,7 +79,8 @@ namespace TShockAPI private static void Listener() { - listener = new UdpClient(ListenPort); + if (listener == null) + listener = new UdpClient(ListenPort); while (ContinueServer) { try