Closed
Description
umqtt.robust works when WiFi fails completely. In testing there are circumstances when WiFi performance can be degraded to a point where blocking sockets can hang indefinitely without throwing an OSError. The behaviour is hard to replicate consistently. Moving slowly to the limit of WiFi range can (rarely) provoke it. It occurs here every few hours even when well within range, perhaps owing to RF interference. I have seen the following in many hours of testing:
- Socket read and write methods hanging for long periods.
- Publish with qos==1 failing to receive a PUBACK.
These will cause an application to hang. Possible fixes:
- Use a socket timeout rather than a blocking socket.
- Implement a timeout in the qos==1 loop which waits for a PUBACK. This begs the question as to what to do if a PUBACK is not received when the timeout expires. Arguably the publication should be repeated with dup==1 on the grounds that the broker may not have received the original message.
Metadata
Metadata
Assignees
Labels
No labels