fix: 修复重复SSE请求的问题

This commit is contained in:
kuaifan 2023-12-14 16:00:54 +08:00
parent c4e72507e0
commit 603db9de7f

View File

@ -129,11 +129,10 @@ export class SSEClient {
} }
if (this.retry > 0) { if (this.retry > 0) {
this.retry--;
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.subscribe(type, handler); this.subscribe(type, handler);
}, this.options.interval); }, this.options.interval);
} else {
this.retry--;
} }
}; };
} }