dart_ping
dart_ping copied to clipboard
loop for checking is incorrect for android
Hi! If I add more than one server the answer will be the same for all servers
var domains = [
'154.16.146.45',
'187.188.169.169',
];
List<Future<PingData>> pings = domains.map((e) => Ping(e, count: 1).stream.first).toList();
List<PingData> results = await Future.wait(pings);
I get:
[PingResponse(seq:1, ip:154.16.146.45, ttl:255, time:176.0 ms), PingResponse(seq:1, ip:187.188.169.169, ttl:255, time:176.0 ms)]
If I use the server alone, the output will be like this AND IT IS CORRECT:
[PingResponse(seq:1, ip:154.16.146.45, ttl:255, time:170.0 ms)]
and
[PingResponse(seq:1, ip:187.188.169.169, ttl:255, time:236.0 ms)]
Oh that is strange. I will definitely look into this. Thanks for the report