mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
Fix: logical error when connecting to the server
This commit is contained in:
@@ -30,7 +30,7 @@ class ServerProvider extends BusyProvider {
|
||||
ServerStatus get emptyStatus => ServerStatus(
|
||||
emptyCpu2Status,
|
||||
[100, 0],
|
||||
'',
|
||||
'Loading...',
|
||||
'',
|
||||
[DiskInfo('/', '/', 0, '0', '0', '0')],
|
||||
TcpStatus(0, 0, 0, 0));
|
||||
@@ -114,7 +114,7 @@ class ServerProvider extends BusyProvider {
|
||||
final client = _servers[idx].client;
|
||||
final connected = await client.isConnected();
|
||||
final state = _servers[idx].connectionState;
|
||||
if (!connected || state != ServerConnectionState.connected) {
|
||||
if (!connected || state == ServerConnectionState.failed || state == ServerConnectionState.disconnected) {
|
||||
_servers[idx].connectionState = ServerConnectionState.connecting;
|
||||
notifyListeners();
|
||||
final time1 = DateTime.now();
|
||||
|
||||
Reference in New Issue
Block a user