Skip to content

Commit 0a9e405

Browse files
committed
Complete pipes when closing
1 parent 06ef4ec commit 0a9e405

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
@@ -216,6 +216,8 @@ public void Close()
216216
{
217217
_channelWriter.Complete();
218218
_writerTask?.GetAwaiter().GetResult();
219+
_pipeWriter.Complete();
220+
_pipeReader.Complete();
219221
}
220222
catch
221223
{
@@ -250,6 +252,10 @@ public bool TryReadFrame(out InboundFrame frame)
250252

251253
public void SendHeader()
252254
{
255+
/*
256+
* Note: this stream is deliberately not disposed
257+
* https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1264#discussion_r1100742748
258+
*/
253259
#if NET
254260
_pipeWriter.AsStream().Write(ProtocolHeader);
255261
#else

0 commit comments

Comments
 (0)