friedrith / node-wifi

📶 NodeJS tool to manage wifi (connections, scans)
MIT License
399 stars 161 forks source link

getCurrentConnections fixed for Mac OS #32

Closed felixgalindo closed 6 years ago

felixgalindo commented 6 years ago

Fixed issue where callback passed to getCurrentConnections wasn't being called.

friedrith commented 6 years ago

So it is the update of the #29 Pull request ? Config is not used for now but all getCurrentConnections (macOS, linux, windows) have the same interface to manage it in the future. For example, we could get information only about the wireless interface given in the configuration.

But I see there is really a disturbing behavior between with and without callback. I think it should work well without callback (using promise) while callback is not called when given. Is it your issue ?

Sorry about all these questions but issue #28 wasn't very descriptive about the problem you encounter.

friedrith commented 6 years ago

After regarding the code in details, I noticed that the problem was coming from the call to getCurrentConnections(callback). It should be getCurrentConnections(config, callback). I corrected the bug myself with keeping config but callback should work now on macOS.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.