Browse Source

add lock for Close()

tags/2.3
clowwindy 10 years ago
parent
commit
1ecd7daac8
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      shadowsocks-csharp/Controller/Local.cs

+ 6
- 3
shadowsocks-csharp/Controller/Local.cs View File

@@ -144,11 +144,14 @@ namespace Shadowsocks.Controller
public void Close()
{
if (closed)
lock (this)
{
return;
if (closed)
{
return;
}
closed = true;
}
closed = true;
if (connection != null)
{
try


Loading…
Cancel
Save