WiFi connection

22 posts / 0 new
Last post
His Nerdship's picture
Offline
Last seen: 5 years 6 months ago
Joined: 05/08/2019
Posts: 18
Check if a DataWriter is ready to write

Following on from my previous post re unreliable WiFi connections, I found that the problem was caused by calling DataWriter::write()too soon after creating the DataWriter.  Because write()is non-blocking it returned immediately without doing anything.  Also, because it is void, there is no error return code.

So the publishing app was not in fact sending anything, and I had no way of knowing.

It obviously needed more time to assemble its plumbing, so I put in a 2 second sleep, after which it worked.

Organization:
Subscribe to RSS - WiFi connection