Commit d5015782 authored by Marc Gravell's avatar Marc Gravell

track when we sever the connection

parent 8bcdcea6
......@@ -26,7 +26,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.76" />
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.1-alpha.77" />
<PackageReference Include="System.Threading.Channels" Version="4.5.0" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -676,7 +676,7 @@ private WriteResult WriteMessageToServerInsideWriteLock(PhysicalConnection conne
{
throw ExceptionFactory.MasterOnly(Multiplexer.IncludeDetailInExceptions, message.Command, message, ServerEndPoint);
}
if (message.Command == RedisCommand.QUIT) connection.RecordQuit();
SelectDatabaseInsideWriteLock(connection, message);
if (!connection.TransactionActive)
......
......@@ -651,6 +651,10 @@ internal void WriteHeader(RedisCommand command, int arguments, CommandBytes comm
_ioPipe.Output.Advance(offset);
}
internal void RecordQuit() // don't blame redis if we fired the first shot
=> (_ioPipe as SocketConnection)?.TrySetProtocolShutdown(PipeShutdownKind.ProtocolExitClient);
internal static void WriteMultiBulkHeader(PipeWriter output, long count)
{
// *{count}\r\n = 3 + MaxInt32TextLen
......
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