[Modify] Polish it

This commit is contained in:
sta 2020-11-21 17:14:53 +09:00
parent 004f51574e
commit 061159b4bf

View File

@ -301,21 +301,19 @@ namespace WebSocketSharp.Net
try { try {
conn = new HttpConnection (socket, listener); conn = new HttpConnection (socket, listener);
lock (listener._unregisteredSync)
listener._unregistered.Add (conn);
conn.BeginReadRequest ();
} }
catch { catch (Exception) {
if (conn != null) { // TODO: Logging.
conn.Close (true);
return;
}
socket.Close (); socket.Close ();
return;
} }
lock (listener._unregisteredSync)
listener._unregistered.Add (conn);
conn.BeginReadRequest ();
} }
private static bool removeSpecial ( private static bool removeSpecial (