-
Notifications
You must be signed in to change notification settings - Fork 30
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
Socket error after bind fails #24
Comments
Moving the start of scanning would solve this issue only part wise (if you do not use startDiscovery directly afterwards) . Say you use the |
Moving the start of scanning would also be correct in order of sending start. Should all be solved now and be part of the next release, thanks. |
* develop: Check if socket is bound when sending packets #24 Close client socket on error Document new settings in README New config option to set custom broadcast address Update tests and checks for accessing a bulb in a foreign network Bump dependencies Revert rolling over sequence number Adjust sequence expectations (reverted from commit 62d9a70) Adjust sequence expectations Fix travis errors Add documentation for lights Allow accessing a bulb in a foreign network Correct the product name for the Color BR30 bulb
In
node-lifx/lib/lifx/client.js
ifbind
fails (say, because the address is in use) the error is emitted correctly. Unfortunately, later onsocket.send
will cause an exception during scanning becauseself.port
is not set up correctly.This can be fixed by moving this code
Inside the
this.socket.bind
block that immediately precedes it. e.g.The text was updated successfully, but these errors were encountered: