fix: alterUrl will change spi's props

This commit is contained in:
lollipopkit
2023-08-13 21:19:16 +08:00
parent 7ce03c18b2
commit 1af7271a06
3 changed files with 15 additions and 8 deletions

View File

@@ -58,10 +58,10 @@ Future<SSHClient> genClient(
} catch (e) {
if (spi.alterUrl == null) rethrow;
try {
spi.fromStringUrl();
final ipPort = spi.fromStringUrl();
socket = await SSHSocket.connect(
spi.ip,
spi.port,
ipPort.ip,
ipPort.port,
timeout: const Duration(seconds: 5),
);
} catch (e) {