diff --git a/templates/web/src/client.ts.twig b/templates/web/src/client.ts.twig index f952c31c2..19ca21691 100644 --- a/templates/web/src/client.ts.twig +++ b/templates/web/src/client.ts.twig @@ -186,7 +186,11 @@ class Client { } }, createSocket: () => { - if (this.realtime.channels.size < 1) return; + if (this.realtime.channels.size < 1) { + this.realtime.reconnect = false; + this.realtime.socket?.close(); + return; + } const channels = new URLSearchParams(); channels.set('project', this.config.project);