Flush messages before going to sleep

I’m dropping a note here for someone like me looking for documentation on the behavior of calling publish() followed by sleep(). Maybe this will save you some time:

There are currently only a few cases where sleep() will check for outgoing messages to be ACK’d before sleeping. You need to be using the Electron, and only certain sleep modes. I’ll leave it to someone else to clarify which sleep modes are supported, but Deep Sleep isn’t supported.

It’s unfortunate that the “Add Documentation” checkbox remains unchecked on this pull request.

2 Likes