mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
Will display the exception of Server Connection
This commit is contained in:
@@ -37,7 +37,8 @@ class ServerStatus {
|
||||
List<DiskInfo> disk;
|
||||
TcpStatus tcp;
|
||||
NetSpeed netSpeed;
|
||||
String? failedInfo;
|
||||
|
||||
ServerStatus(this.cpu2Status, this.memory, this.sysVer, this.uptime,
|
||||
this.disk, this.tcp, this.netSpeed);
|
||||
this.disk, this.tcp, this.netSpeed, {this.failedInfo});
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ class ServerProvider extends BusyProvider {
|
||||
notifyListeners();
|
||||
} catch (e) {
|
||||
_servers[idx].connectionState = ServerConnectionState.failed;
|
||||
_servers[idx].status.failedInfo = e.toString().split(', ')[1];
|
||||
notifyListeners();
|
||||
logger.warning(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user