[Modify] Polish it
This commit is contained in:
parent
c122e2dc72
commit
22a24c462c
@ -553,19 +553,17 @@ namespace WebSocketSharp.Net
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<HttpListenerPrefix> prefs, prefs2;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
prefs = _prefixes;
|
current = _prefixes;
|
||||||
|
|
||||||
if (!prefs.Contains (prefix))
|
if (!current.Contains (prefix))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
prefs2 = new List<HttpListenerPrefix> (prefs);
|
future = new List<HttpListenerPrefix> (current);
|
||||||
prefs2.Remove (prefix);
|
future.Remove (prefix);
|
||||||
}
|
}
|
||||||
while (
|
while (
|
||||||
Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs
|
Interlocked.CompareExchange (ref _prefixes, future, current) != current
|
||||||
);
|
);
|
||||||
|
|
||||||
leaveIfNoPrefix ();
|
leaveIfNoPrefix ();
|
||||||
|
Loading…
Reference in New Issue
Block a user