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

multiple async operations, same result #70

Open
celevra opened this issue Dec 2, 2023 · 0 comments
Open

multiple async operations, same result #70

celevra opened this issue Dec 2, 2023 · 0 comments

Comments

@celevra
Copy link

celevra commented Dec 2, 2023

hi,

giving this example:

const find = require('local-devices');
var nets = ['192.168.172.1/24', '192.168.10.222/24', '192.168.152.1/24']
for (var n in nets)
{
  find({ address: nets[n] }).then(devices => {
    console.log(nets[n])
    console.log(devices)
  })
}

will return the different nets, but in all 3 returns the same devices. Seems like its not async compatible

regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant