Returned to the previous, this is for Unity

This commit is contained in:
sta 2015-01-06 15:39:29 +09:00
parent 6af171ddcb
commit 61f62f050f

View File

@ -458,9 +458,7 @@ namespace WebSocketSharp.Net
if (!removeSpecial (future, prefix)) if (!removeSpecial (future, prefix))
break; // The prefix wasn't found. break; // The prefix wasn't found.
} }
while ( while (Interlocked.CompareExchange (ref _unhandled, future, current) != current);
Interlocked.CompareExchange<List<HttpListenerPrefix>> (
ref _unhandled, future, current) != current);
checkIfRemove (); checkIfRemove ();
return; return;
@ -476,9 +474,7 @@ namespace WebSocketSharp.Net
if (!removeSpecial (future, prefix)) if (!removeSpecial (future, prefix))
break; // The prefix wasn't found. break; // The prefix wasn't found.
} }
while ( while (Interlocked.CompareExchange (ref _all, future, current) != current);
Interlocked.CompareExchange<List<HttpListenerPrefix>> (
ref _all, future, current) != current);
checkIfRemove (); checkIfRemove ();
return; return;
@ -493,9 +489,7 @@ namespace WebSocketSharp.Net
prefs2 = new Dictionary<HttpListenerPrefix, HttpListener> (prefs); prefs2 = new Dictionary<HttpListenerPrefix, HttpListener> (prefs);
prefs2.Remove (prefix); prefs2.Remove (prefix);
} }
while ( while (Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs);
Interlocked.CompareExchange<Dictionary<HttpListenerPrefix, HttpListener>> (
ref _prefixes, prefs2, prefs) != prefs);
checkIfRemove (); checkIfRemove ();
} }