Join GitHub today
[Electron] encounters full handshake up to every 4th publish #1133
In two different occurrences, while using sleep stop mode and publishing data, it was found that the electron appears to be encountering a full handshake every 4th publish.
First occurrence: https://community.particle.io/t/cant-get-cellulardata-to-work/23519/20
Second occurrence (0.6.0-rc.2): https://community.particle.io/t/electron-strange-behavior-with-sleeping/26264
See above posts for test code.
It appears in the second case that adding a 5 second delay between the publish and sleep calls helps to remedy the solution.
In the first case, just enabling debugging with DEBUG_BUILD=y helps to greatly reduce the frequency that full handshakes occur. This seems to indicate delays are helping to remedy the solution as well. Keep in mind this previous PR that was designed to wait for all confirmable UDP messages to be sent before going to sleep, which alleviates the need for delays before sleep calls on the Electron. This looks related, but might be due to a different root cause.