fix(sse): stop error spam for already closed connections
Build and Push Image / build-backend (push) Successful in 35s
Build and Push Image / build-frontend (push) Successful in 4m48s
Build and Push Image / push (push) Successful in 1m6s

This commit is contained in:
2026-06-28 17:12:45 +07:00 Unverified
parent 108c594a47
commit b6010a31c3
+6 -2
View File
@@ -52,13 +52,17 @@ export class PubSubManager {
function ping() {
clearTimeout(heartbeatTimeout);
heartbeatTimeout = setTimeout(() => {
writer.write(":)\n\n");
try {
writer.write(":)\n\n");
} catch {}
ping();
}, 90000); // cloudflare timeout = 100s
}
const write = (payload: PubPayload) => {
writer.write(this.constructMessage(payload.data, payload.event));
try {
writer.write(this.constructMessage(payload.data, payload.event));
} catch {}
ping();
};