Commit ecb9e3fe authored by Marc Gravell's avatar Marc Gravell

Critical fix: ReconfigureAsync was incorrectly spinning up new ServerEndPoint...

Critical fix: ReconfigureAsync was incorrectly spinning up new ServerEndPoint instances after disconnect
parent 9ebe3e46
......@@ -1062,8 +1062,6 @@ public void GetStatus(TextWriter log)
internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, TextWriter log, EndPoint blame, string cause, bool publishReconfigure = false, CommandFlags publishReconfigureFlags = CommandFlags.None)
{
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)
{
......
......@@ -414,6 +414,10 @@ internal void OnHeartbeat(bool ifConnectedOnly)
var tmp = physical;
if (tmp != null)
{
if(state == (int)State.ConnectedEstablished)
{
tmp.Bridge.ServerEndPoint.ClearUnselectable(UnselectableFlags.DidNotRespond);
}
tmp.OnHeartbeat();
int writeEverySeconds = serverEndPoint.WriteEverySeconds,
checkConfigSeconds = multiplexer.RawConfig.ConfigCheckSeconds;
......
......@@ -43,7 +43,7 @@ internal sealed partial class ServerEndPoint : IDisposable
private bool slaveReadOnly, isSlave;
private volatile UnselectableFlags unselectableReasons;
internal volatile UnselectableFlags unselectableReasons;
private Version version;
......
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