fix: JS SDK 传输失败后换 rid 再泵发送队列

This commit is contained in:
Nixevol
2026-09-30 19:18:47 +08:00
parent 241531479e
commit 08c08de5e8
3 changed files with 52 additions and 0 deletions
+2
View File
@@ -739,10 +739,12 @@ export class Client {
this.finishSendErr(item, this.stopErr());
return;
}
// 传输失败但连接未断:换 rid 后立刻再泵,否则 hello 不再走、send 会挂起
item.inflight = false;
this.inflight = Math.max(0, this.inflight - 1);
this.pending.delete(rid);
this.regenerateSend(item);
void this.drainSendQueue();
return;
}
this.finishSendErr(item, e);