mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
server connect: max try 7 times
This commit is contained in:
@@ -15,7 +15,11 @@ List<SSHKeyPair> loadIndentity(String key) {
|
||||
}
|
||||
|
||||
Future<SSHClient> genClient(ServerPrivateInfo spi) async {
|
||||
final socket = await SSHSocket.connect(spi.ip, spi.port);
|
||||
final socket = await SSHSocket.connect(
|
||||
spi.ip,
|
||||
spi.port,
|
||||
timeout: const Duration(seconds: 5),
|
||||
);
|
||||
if (spi.pubKeyId == null) {
|
||||
return SSHClient(
|
||||
socket,
|
||||
|
||||
Reference in New Issue
Block a user