fix: 停机排空计入正在发送的帧并为断开预留时间

This commit is contained in:
Nixevol
2026-09-30 19:29:37 +08:00
parent a7a6e34387
commit ca3434421b
4 changed files with 41 additions and 7 deletions
+2
View File
@@ -118,6 +118,8 @@ func (st *connState) sendOne(b *Broker, item downItem) {
st.signalSent(item)
return
}
st.inSend.Add(1)
defer st.inSend.Add(-1)
large := len(item.payload) > largeFrameBytes
if large {
if err := b.acquireLarge(context.Background()); err != nil {