We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2210619 commit 603c3deCopy full SHA for 603c3de
src/EmbedIO/Net/Internal/EndPointListener.cs
@@ -170,11 +170,19 @@ public void RemovePrefix(ListenerPrefix prefix)
170
do
171
{
172
prefs = _prefixes;
173
- if (!prefs.ContainsKey(prefix))
+ ListenerPrefix lpKey = null;
174
+ foreach (var p in _prefixes.Keys)
175
+ if (p.Path == prefix.Path)
176
+ {
177
+ lpKey = p;
178
+ break;
179
+ }
180
+
181
+ if (lpKey is null)
182
break;
183
184
p2 = prefs.ToDictionary(x => x.Key, x => x.Value);
- p2.Remove(prefix);
185
+ p2.Remove(lpKey);
186
}
187
while (Interlocked.CompareExchange(ref _prefixes, p2, prefs) != prefs);
188
@@ -378,4 +386,4 @@ private void CheckIfRemove()
378
386
EndPointManager.RemoveEndPoint(this, _endpoint);
379
387
380
388
381
-}
389
+}
0 commit comments