Skip to content

Commit e5df795

Browse files
committed
Refactored a few for EndPointListener.cs
1 parent b73a95d commit e5df795

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

websocket-sharp/Net/EndPointListener.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ internal void RemoveConnection (HttpConnection connection)
373373

374374
#region Public Methods
375375

376-
public void AddPrefix (HttpListenerPrefix prefix, HttpListener httpListener)
376+
public void AddPrefix (HttpListenerPrefix prefix, HttpListener listener)
377377
{
378378
List<HttpListenerPrefix> current, future;
379379
if (prefix.Host == "*") {
@@ -383,7 +383,7 @@ public void AddPrefix (HttpListenerPrefix prefix, HttpListener httpListener)
383383
? new List<HttpListenerPrefix> (current)
384384
: new List<HttpListenerPrefix> ();
385385

386-
prefix.Listener = httpListener;
386+
prefix.Listener = listener;
387387
addSpecial (future, prefix);
388388
}
389389
while (Interlocked.CompareExchange (ref _unhandled, future, current) != current);
@@ -398,7 +398,7 @@ public void AddPrefix (HttpListenerPrefix prefix, HttpListener httpListener)
398398
? new List<HttpListenerPrefix> (current)
399399
: new List<HttpListenerPrefix> ();
400400

401-
prefix.Listener = httpListener;
401+
prefix.Listener = listener;
402402
addSpecial (future, prefix);
403403
}
404404
while (Interlocked.CompareExchange (ref _all, future, current) != current);
@@ -411,15 +411,15 @@ public void AddPrefix (HttpListenerPrefix prefix, HttpListener httpListener)
411411
prefs = _prefixes;
412412
if (prefs.ContainsKey (prefix)) {
413413
var other = prefs[prefix];
414-
if (other != httpListener)
414+
if (other != listener)
415415
throw new HttpListenerException (
416416
400, String.Format ("There's another listener for {0}.", prefix)); // TODO: Code?
417417

418418
return;
419419
}
420420

421421
prefs2 = new Dictionary<HttpListenerPrefix, HttpListener> (prefs);
422-
prefs2[prefix] = httpListener;
422+
prefs2[prefix] = listener;
423423
}
424424
while (Interlocked.CompareExchange (ref _prefixes, prefs2, prefs) != prefs);
425425
}
@@ -451,7 +451,7 @@ public void Close ()
451451
}
452452
}
453453

454-
public void RemovePrefix (HttpListenerPrefix prefix, HttpListener httpListener)
454+
public void RemovePrefix (HttpListenerPrefix prefix, HttpListener listener)
455455
{
456456
List<HttpListenerPrefix> current, future;
457457
if (prefix.Host == "*") {

0 commit comments

Comments
 (0)