Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pings (promises) in parallel impacts other #46

Open
kiranpradeep opened this issue Dec 21, 2023 · 0 comments
Open

pings (promises) in parallel impacts other #46

kiranpradeep opened this issue Dec 21, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kiranpradeep
Copy link

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.

Screenshot 2023-12-21 at 8 14 28 PM

@dopecodez dopecodez added bug Something isn't working good first issue Good for newcomers labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants