Remove Platform.localhostname because it is not supported in web app.
This commit is contained in:
parent
6580518105
commit
9128bb1cbb
@ -34,13 +34,10 @@ class ServerConnection {
|
|||||||
|
|
||||||
void connect() {
|
void connect() {
|
||||||
if (wasConnected) channel.sink.close();
|
if (wasConnected) channel.sink.close();
|
||||||
if (Platform.localHostname == 'mbook') {
|
|
||||||
// My test environment
|
|
||||||
channel = WebSocketChannel.connect(Uri.parse('ws://localhost:8080'));
|
|
||||||
} else {
|
|
||||||
channel =
|
channel =
|
||||||
WebSocketChannel.connect(Uri.parse('wss://chess.sw-gross.de:8080'));
|
WebSocketChannel.connect(Uri.parse('wss://chess.sw-gross.de:8080'));
|
||||||
}
|
|
||||||
log(channel.closeCode.toString());
|
log(channel.closeCode.toString());
|
||||||
|
|
||||||
wasConnected = true;
|
wasConnected = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user