Skip to content

Commit 2fc1e1f

Browse files
check channels while creating socket
1 parent b4b06a2 commit 2fc1e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/flutter/lib/src/realtime_mixin.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mixin RealtimeMixin {
3434
}
3535

3636
_createSocket() async {
37-
if(_creatingSocket) return;
37+
if(_creatingSocket || _channels.isEmpty) return;
3838
_creatingSocket = true;
3939
final uri = _prepareUri();
4040
if (_websok == null) {

0 commit comments

Comments
 (0)