Commit 6b112be2 authored by Marc Gravell's avatar Marc Gravell

Ensure that pre-handshake backlog is completed successfully; also simplify how...

Ensure that pre-handshake backlog is completed successfully; also simplify how sent messages get the exception recorded; can massively simplify if we know we've already burned the connection
parent 9bcf7165
......@@ -599,6 +599,11 @@ internal void Fail(ConnectionFailureType failure, Exception innerException)
resultProcessor?.ConnectionFail(this, failure, innerException);
}
internal void SetException(Exception exception)
{
resultBox?.SetException(exception);
}
internal void SetEnqueued()
{
performance?.SetEnqueued();
......
......@@ -335,7 +335,11 @@ private void AbandonPendingBacklog(Exception ex)
do
{
next = DequeueNextPendingBacklog();
next?.Cancel(ex);
if(next != null)
{
next.Cancel(ex);
CompleteSyncOrAsync(next);
}
} while (next != null);
}
internal void OnFullyEstablished(PhysicalConnection connection)
......
......@@ -247,7 +247,7 @@ void add(string lk, string sk, string v)
{
var next = outstanding.Dequeue();
Bridge.Trace("Failing: " + next);
next.Fail(failureType, innerException);
next.SetException(innerException);
Bridge.CompleteSyncOrAsync(next);
}
}
......
......@@ -23,7 +23,7 @@ private static int Main()
EndPoints = { "127.0.0.1:6381" },
Password = "abc",
};
using (var conn = ConnectionMultiplexer.Connect(config, log: Console.Out))
using (var conn = ConnectionMultiplexer.Connect(config, log: null))
{
//Execute(conn);
......
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