You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in index.js and lwrf-energy.js there is the following code:
client.bind(9761);client.setBroadcast(true);
Due to known issues with dgram setBroadcast must only be called after bind (as done above) but bind is an async call.
On my laptop (Macbook - OSX) this consistently fails as bind has not completed by the time setBroadcast is called. I haven't observed this directly on the ninjablock but I have had intermittent failures which may be as a result.
The fix is simple (but I am writing it from memory as on different machine):
client.on("listening",function(){client.setBroadcast(true);/* send message in here etc etc */});client.bind();/* this will trigger the listening callback */
I can submit a push request for this later but thought I would raise the issue first (and I have been hacking my code to get everything working so need to tidy up)
The text was updated successfully, but these errors were encountered:
in index.js and lwrf-energy.js there is the following code:
Due to known issues with dgram setBroadcast must only be called after bind (as done above) but bind is an async call.
On my laptop (Macbook - OSX) this consistently fails as bind has not completed by the time setBroadcast is called. I haven't observed this directly on the ninjablock but I have had intermittent failures which may be as a result.
The fix is simple (but I am writing it from memory as on different machine):
I can submit a push request for this later but thought I would raise the issue first (and I have been hacking my code to get everything working so need to tidy up)
The text was updated successfully, but these errors were encountered: