diff --git a/lib/src/services/impls/host_scanner_service_impl.dart b/lib/src/services/impls/host_scanner_service_impl.dart index 7ce260c..12d04fa 100644 --- a/lib/src/services/impls/host_scanner_service_impl.dart +++ b/lib/src/services/impls/host_scanner_service_impl.dart @@ -202,12 +202,12 @@ class HostScannerServiceImpl extends HostScannerService { ], ); } else if (message is SendableActiveHost) { - progressCallback - ?.call((i - firstHostId) * 100 / (lastValidSubnet - firstHostId)); - // print('Address ${message.address}'); final activeHostFound = ActiveHost.fromSendableActiveHost(sendableActiveHost: message); await activeHostFound.resolveInfo(); + final j = int.tryParse(activeHostFound.hostId) ?? i; + progressCallback + ?.call((j - firstHostId) * 100 / (lastValidSubnet - firstHostId)); yield activeHostFound; } else if (message is String && message == 'Done') { isolate.kill();