Commit 7445a008 authored by piccit's avatar piccit

Prevent Complete from being called twice on PING in a disconnect scenario

parent 6e2a7a20
......@@ -35,11 +35,13 @@ public Message PeekPing(out int queueLength)
queueLength = high.Count + regular.Count;
if (high.Count != 0 && (peeked = high.Peek()).Command == RedisCommand.PING)
{
return peeked;
//In a disconnect scenario, we don't want to complete the Ping message twice,
//dequeue it now so it wont get dequeued in AbortUnsent (if we're going down that code path)
return high.Dequeue();
}
if (regular.Count != 0 && (peeked = regular.Peek()).Command == RedisCommand.PING)
{
return peeked;
return regular.Dequeue();
}
}
return null;
......
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