Commit b4766acb authored by Marc Gravell's avatar Marc Gravell

Merge pull request #71 from deepakverma/master

Cannot access a disposed object when auth fails Issue #50 and connection fails to reconnect with retry when cache is under load #65
parents 02ae9601 525b188d
......@@ -1060,7 +1060,8 @@ public void GetStatus(TextWriter log)
internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, TextWriter log, EndPoint blame, string cause)
{
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;
if (log == null)
{
......@@ -1119,7 +1120,6 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
}
}
}
int attemptsLeft = first ? configuration.ConnectRetry : 1;
bool healthy = false;
......
......@@ -523,6 +523,8 @@ static void WriteUnified(Stream stream, long value)
void BeginReading()
{
bool keepReading;
try
{
do
{
keepReading = false;
......@@ -536,6 +538,11 @@ void BeginReading()
}
} while (keepReading);
}
catch(System.IO.IOException ex)
{
multiplexer.Trace("Could not connect: " + ex.Message, physicalName);
}
}
int haveReader;
internal int GetAvailableInboundBytes(out int activeReaders)
......
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