Commit 525b188d authored by deepakverma's avatar deepakverma

on connection fail consider recreating it with retry

parent 80b5e3d7
...@@ -1060,7 +1060,8 @@ public void GetStatus(TextWriter log) ...@@ -1060,7 +1060,8 @@ public void GetStatus(TextWriter log)
internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, TextWriter log, EndPoint blame, string cause) internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, TextWriter log, EndPoint blame, string cause)
{ {
if (isDisposed) throw new ObjectDisposedException(ToString()); if (isDisposed) throw new ObjectDisposedException(ToString());
//if connection failed treat it as first to honor retry logic.
first = cause.CompareTo("connection failed") == 0 ? true : first;
bool showStats = true; bool showStats = true;
if (log == null) if (log == null)
{ {
...@@ -1119,7 +1120,6 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text ...@@ -1119,7 +1120,6 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
} }
} }
} }
int attemptsLeft = first ? configuration.ConnectRetry : 1; int attemptsLeft = first ? configuration.ConnectRetry : 1;
bool healthy = false; bool healthy = false;
......
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