From a350998fcd8bb4cdc0dcc58d70ea9b2585ec65f0 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Tue, 5 Sep 2023 11:28:51 +0000 Subject: [PATCH] custom-devices: add timeout to ping command This change adds 10sec timeout to ping command to discovery custom devices. Signed-off-by: Hidenori Matsubayashi --- lib/elinux_device_discovery.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elinux_device_discovery.dart b/lib/elinux_device_discovery.dart index 270052d..67e4396 100644 --- a/lib/elinux_device_discovery.dart +++ b/lib/elinux_device_discovery.dart @@ -152,7 +152,7 @@ class ELinuxDeviceDiscovery extends PollingDeviceDiscovery { RunResult result; try { result = await _processUtils.run(remoteDevice.pingCommand, - throwOnError: true); + throwOnError: true, timeout: const Duration(seconds: 10)); stdout = result.stdout.trim(); } on ProcessException catch (ex) { _logger.printTrace('ping failed to list attached devices:\n$ex');