Skip to content

Commit f5884d2

Browse files
committed
use normal closure
1 parent 109cfc4 commit f5884d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/web/src/services/realtime.ts.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export type RealtimeResponseEvent<T = any> = {
2222
}
2323

2424
export enum RealtimeCode {
25+
NORMAL_CLOSURE = 1000,
2526
POLICY_VIOLATION = 1008,
2627
UNKNOWN_ERROR = -1
2728
}
@@ -199,7 +200,7 @@ export class Realtime {
199200
this.socket.addEventListener('close', () => {
200201
resolve();
201202
}, { once: true });
202-
this.socket.close(RealtimeCode.POLICY_VIOLATION);
203+
this.socket.close(RealtimeCode.NORMAL_CLOSURE);
203204
} else {
204205
resolve();
205206
}

0 commit comments

Comments
 (0)