@actuallab/rpc 13.0.167 → 14.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1332,7 +1332,10 @@ declare class RpcStreamSender<T> implements IRpcObject {
|
|
|
1332
1332
|
* in-flight window — real-time mode uses the extra space to pre-buffer.
|
|
1333
1333
|
*/
|
|
1334
1334
|
private _run;
|
|
1335
|
-
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1335
|
+
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1336
|
+
* A reconnect's reset ACK may be drained in one batch with regular
|
|
1337
|
+
* consumption ACKs the client sends right after it, so `mustReset` is
|
|
1338
|
+
* OR-ed over the whole batch — the last ACK alone can't represent it. */
|
|
1336
1339
|
private _tryProcessAcks;
|
|
1337
1340
|
/** Wait for the ACK queue to have at least one entry (or `_ended`). */
|
|
1338
1341
|
private _waitAckReady;
|
package/dist/index.d.ts
CHANGED
|
@@ -1332,7 +1332,10 @@ declare class RpcStreamSender<T> implements IRpcObject {
|
|
|
1332
1332
|
* in-flight window — real-time mode uses the extra space to pre-buffer.
|
|
1333
1333
|
*/
|
|
1334
1334
|
private _run;
|
|
1335
|
-
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1335
|
+
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1336
|
+
* A reconnect's reset ACK may be drained in one batch with regular
|
|
1337
|
+
* consumption ACKs the client sends right after it, so `mustReset` is
|
|
1338
|
+
* OR-ed over the whole batch — the last ACK alone can't represent it. */
|
|
1336
1339
|
private _tryProcessAcks;
|
|
1337
1340
|
/** Wait for the ACK queue to have at least one entry (or `_ended`). */
|
|
1338
1341
|
private _waitAckReady;
|
package/dist/index.js
CHANGED
|
@@ -1362,13 +1362,18 @@ var RpcStreamSender = class _RpcStreamSender {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
1364
|
/* eslint-enable @typescript-eslint/no-unnecessary-condition */
|
|
1365
|
-
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1365
|
+
/** Drain all queued ACKs, returning the most recent one (or null if none).
|
|
1366
|
+
* A reconnect's reset ACK may be drained in one batch with regular
|
|
1367
|
+
* consumption ACKs the client sends right after it, so `mustReset` is
|
|
1368
|
+
* OR-ed over the whole batch — the last ACK alone can't represent it. */
|
|
1366
1369
|
_tryProcessAcks() {
|
|
1367
1370
|
if (this._acks.length === 0) return null;
|
|
1368
|
-
let
|
|
1371
|
+
let nextIndex = 0;
|
|
1372
|
+
let mustReset = false;
|
|
1369
1373
|
while (this._acks.length > 0) {
|
|
1370
1374
|
const a = this._acks.shift();
|
|
1371
|
-
|
|
1375
|
+
nextIndex = a.nextIndex;
|
|
1376
|
+
mustReset ||= a.mustReset;
|
|
1372
1377
|
if (a.mustReset || this._nextIndex < a.nextIndex) {
|
|
1373
1378
|
this._nextIndex = a.nextIndex;
|
|
1374
1379
|
}
|
|
@@ -1377,7 +1382,7 @@ var RpcStreamSender = class _RpcStreamSender {
|
|
|
1377
1382
|
this.onAckProcessed?.();
|
|
1378
1383
|
} catch {
|
|
1379
1384
|
}
|
|
1380
|
-
return
|
|
1385
|
+
return { nextIndex, mustReset };
|
|
1381
1386
|
}
|
|
1382
1387
|
/** Wait for the ACK queue to have at least one entry (or `_ended`). */
|
|
1383
1388
|
async _waitAckReady() {
|