[Modify] Polish it

master
sta 5 years ago
parent 004f51574e
commit 061159b4bf

@ -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);
socket.Close ();
return; return;
} }
socket.Close (); lock (listener._unregisteredSync)
} listener._unregistered.Add (conn);
conn.BeginReadRequest ();
} }
private static bool removeSpecial ( private static bool removeSpecial (

Loading…
Cancel
Save