Skip to content

Commit 06ef4ec

Browse files
committed
Do not try to write when the frame handler is closed
1 parent 390d503 commit 06ef4ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

projects/RabbitMQ.Client/client/impl/SocketFrameHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ public void SendHeader()
259259

260260
public void Write(ReadOnlyMemory<byte> memory)
261261
{
262+
if (_closed)
263+
{
264+
return;
265+
266+
}
267+
262268
if (!_channelWriter.TryWrite(memory))
263269
{
264270
throw new ApplicationException("Please report this bug here: https://github.com/rabbitmq/rabbitmq-dotnet-client/issues");

0 commit comments

Comments
 (0)