fix(mux): Reset stream state when client ID changes

This commit is contained in:
zarazaex69
2026-04-09 16:54:44 +03:00
parent 90558154de
commit 12c8241987

View File

@@ -141,10 +141,12 @@ func (m *Multiplexer) HandleFrame(frame []byte) {
recvBuf: make([]byte, 0),
}
m.streams[sid] = stream
} else if stream.ClientID != clientID {
stream.ClientID = clientID
stream.recvBuf = make([]byte, 0)
stream.closed = false
}
if stream.ClientID == clientID {
stream.recvBuf = append(stream.recvBuf, data...)
}
stream.recvBuf = append(stream.recvBuf, data...)
m.mu.Unlock()
}