We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d6d3c3 commit c4b2066Copy full SHA for c4b2066
app/lib/models/communicator.dart
@@ -112,8 +112,9 @@ class SocketNotifier extends StateNotifier<Socket?> {
112
return;
113
}
114
115
- var url = secure ? "wss://$hostname" : "ws://$hostname";
116
- if (port != null) url += ":$port";
+ var socketPort = (port == null || port == 0) ? (secure ? 443 : 80) : port;
+ var scheme = secure ? "wss" : "ws";
117
+ var url = "$scheme://$hostname:$socketPort";
118
if (token != null) url += "?token=$token";
119
120
debugPrint("Initializing socket to $url");
0 commit comments