Commit 0e08f338 authored by Nick Craver's avatar Nick Craver

Better comment on what happens in new ServerEndPoint() calls

parent 56c5a02d
...@@ -865,7 +865,7 @@ internal ServerEndPoint GetServerEndPoint(EndPoint endpoint) ...@@ -865,7 +865,7 @@ internal ServerEndPoint GetServerEndPoint(EndPoint endpoint)
if (isDisposed) throw new ObjectDisposedException(ToString()); if (isDisposed) throw new ObjectDisposedException(ToString());
server = new ServerEndPoint(this, endpoint, null); server = new ServerEndPoint(this, endpoint, null);
// ^^ this could indirectly cause servers to become changes, so treble-check! // ^^ this causes ReconfigureAsync() which calls GetServerEndpoint() which can modify servers, so double check!
if (!servers.ContainsKey(endpoint)) if (!servers.ContainsKey(endpoint))
{ {
servers.Add(endpoint, server); servers.Add(endpoint, server);
...@@ -1236,7 +1236,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text ...@@ -1236,7 +1236,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
if (server == null) if (server == null)
{ {
server = new ServerEndPoint(this, endpoint, log); server = new ServerEndPoint(this, endpoint, log);
// ^^ this could indirectly cause servers to become changes, so treble-check! // ^^ this causes ReconfigureAsync() which calls GetServerEndpoint() which can modify servers, so double check!
if (!servers.ContainsKey(endpoint)) if (!servers.ContainsKey(endpoint))
{ {
servers.Add(endpoint, server); servers.Add(endpoint, server);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment