Skip to content

Commit d679f9c

Browse files
Update templates/react-native/src/client.ts.twig
Co-authored-by: Jake Barnby <[email protected]>
1 parent db41717 commit d679f9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/react-native/src/client.ts.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ class Client {
200200
}
201201
},
202202
createSocket: () => {
203-
if (this.realtime.channels.size < 1) return;
203+
if (this.realtime.channels.size < 1) {
204+
this.realtime.reconnect = false;
205+
this.realtime.socket?.close();
206+
return;
207+
}
204208

205209
const channels = new URLSearchParams();
206210
channels.set('project', this.config.project);

0 commit comments

Comments
 (0)