From 055424cc2e79763ea73bc9dab9946a6095503510 Mon Sep 17 00:00:00 2001 From: canbingzt Date: Thu, 11 Sep 2014 16:16:45 +0800 Subject: [PATCH] issues #11 --- shadowsocks-csharp/Local.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shadowsocks-csharp/Local.cs b/shadowsocks-csharp/Local.cs index 01d79ffd..1aa6ff90 100755 --- a/shadowsocks-csharp/Local.cs +++ b/shadowsocks-csharp/Local.cs @@ -54,6 +54,11 @@ namespace shadowsocks_csharp // Get the socket that handles the client request. Socket listener = (Socket)ar.AsyncState; + if (!listener.Connected) + { + return; + } + listener.BeginAccept( new AsyncCallback(AcceptCallback), listener);