From 3e4e0503133edbd12f10ebd9ea5931c5df5cacfe Mon Sep 17 00:00:00 2001 From: renahita6 Date: Fri, 9 Dec 2022 03:51:38 +0000 Subject: [PATCH] Fixed a bug that mux.Session could not be properly closed when receiving an End status. --- common/mux/client.go | 1 + common/mux/server.go | 1 + 2 files changed, 2 insertions(+) diff --git a/common/mux/client.go b/common/mux/client.go index ccf05cb2..2019738f 100644 --- a/common/mux/client.go +++ b/common/mux/client.go @@ -355,6 +355,7 @@ func (m *ClientWorker) handleStatusEnd(meta *FrameMetadata, reader *buf.Buffered common.Interrupt(s.input) common.Interrupt(s.output) } + common.Interrupt(s.input) s.Close() } if meta.Option.Has(OptionData) { diff --git a/common/mux/server.go b/common/mux/server.go index 3a913098..df461be7 100644 --- a/common/mux/server.go +++ b/common/mux/server.go @@ -202,6 +202,7 @@ func (w *ServerWorker) handleStatusEnd(meta *FrameMetadata, reader *buf.Buffered common.Interrupt(s.input) common.Interrupt(s.output) } + common.Interrupt(s.input) s.Close() } if meta.Option.Has(OptionData) {