diff --git a/internal/quic/conn_streams.go b/internal/quic/conn_streams.go index 7c6c8be2c..a0793297e 100644 --- a/internal/quic/conn_streams.go +++ b/internal/quic/conn_streams.go @@ -372,7 +372,9 @@ func (c *Conn) appendStreamFrames(w *packetWriter, pnum packetNumber, pto bool) state = s.state.set(0, streamQueueData) c.queueStreamForSendLocked(s, state) } - c.streams.needSend.Store(c.streams.queueData.head != nil) + if c.streams.queueMeta.head == nil && c.streams.queueData.head == nil { + c.streams.needSend.Store(false) + } return true }