quartiq / minimq

Minimal no_std MQTT v5.0 client implementation
MIT License
146 stars 16 forks source link

Refactoring `poll()` usage #105

Closed ryan-summers closed 2 years ago

ryan-summers commented 2 years ago

This PR updates the functionality of poll(). Users are now informed that they should call it repeatedly until it returns Ok(None). Functionality has changed such that poll() will process as many MQTT control packets as possible until a publish message is received.

This PR fixes #102

ryan-summers commented 2 years ago

I actually found a few cases where it makes sense to rework things. Hopefully makes the tests a bit more understandable as well.