pingman
pingman copied to clipboard
pings (promises) in parallel impacts other
In below sample, both hosts 192.168.1.1
and 192.168.1.100
are reachable,
var ping = require('pingman');
async function test_pingman() {
let pings = [];
const hosts = ['192.168.1.1','192.168.1.100'];
for (const host of hosts) {
pings.push(ping(host));
}
const responses = await Promise.allSettled(pings);
for(const response of responses) {
console.log(response);
}
}
test_pingman();
It appears results are getting mixed up.