From f392c8a17b38804d6d75282bac3e69dfa53f7546 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 2 Jun 2023 13:22:51 +0300 Subject: [PATCH] receive stream: put back the buffer for the last STREAM frame (#3832) --- receive_stream.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/receive_stream.go b/receive_stream.go index 0a7e9416..89d02b73 100644 --- a/receive_stream.go +++ b/receive_stream.go @@ -179,6 +179,10 @@ func (s *receiveStream) readImpl(p []byte) (bool /*stream completed */, int, err if s.readPosInFrame >= len(s.currentFrame) && s.currentFrameIsLast { s.finRead = true + s.currentFrame = nil + if s.currentFrameDone != nil { + s.currentFrameDone() + } return true, bytesRead, io.EOF } }