custom-devices: add timeout to ping command (#218)

This change adds 10sec timeout to ping command to discovery custom devices.

Signed-off-by: Hidenori Matsubayashi <Hidenori.Matsubayashi@gmail.com>
This commit is contained in:
Hidenori Matsubayashi
2023-09-05 11:33:16 +00:00
committed by GitHub
parent f295a9d303
commit a86363b246
+1 -1
View File
@@ -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');