fix(sdk): transport 测试注释修正(sendBeacon 真实网络警示/退避区间)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-15 16:13:37 +08:00
parent 6be163a329
commit 188e6f39ea
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -7,6 +7,8 @@ export type TransportConfig = Required<CtkConfig>;
// 批量传输:满 batchSize 或 flushMs 到期即发;4xx(除 429)不重试;
// 指数退避 + 抖动重试;重试耗尽按本批事件数计 dropped;queueMax 溢出丢最旧。
// 红线:任何异常不得冒泡到宿主页(定时器/事件回调内的异常无人捕获)。
// 审查留档:events 目前均为 SDK 自产可序列化对象;若未来引入受控外的 events
// 来源,需处理 stringify 抛错时已换出批次的计数(当前静默丢弃不计 dropped)。
export class Transport {
private q: object[] = [];
private timer: ReturnType<typeof setTimeout> | null = null;