You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am developing a program for unattended systems in remote locations (3G/4G connected) that has to publish events to MQTT broker. I have encountered an unexpected behaviour when testing lost of connectivity conditions of such system in a Ubuntu Server 18.04.2 (on VirtualBox 6.1.1 on Windows 10)
Once first connection is stablished wiht broker,
if a loss of connectivity arise (for example shutting down MQTT broker, or deleting default router to internet, or shutting down Ethernet IF)
Linux process unexpectedly ends showing:
It occurs with all transport protocols: tcp, ssl, ws, wss.
It also ocurss in Ubuntu 16.04
However same code compiled in ARM (Raspbian) works correctly.
This is a minimal testing code that reproduce the error. SetKeepAlive and SetPingTimeout are intentionally settled to short times for fast showing the effect. Note than no client activity is performed (other than a dot print).
Apologies @junavarg; this was caused by a bug in a PR #381 (I suspect there may be a few more issues in there; it was a fairly major change that I had intended to test further). It should be corrected by PR #416 - when retrying the connection the code checks if Disconnect() has been called and, if so, drops out of the loop - unfortunately it was checking for the reverse...
Hello, I am developing a program for unattended systems in remote locations (3G/4G connected) that has to publish events to MQTT broker. I have encountered an unexpected behaviour when testing lost of connectivity conditions of such system in a Ubuntu Server 18.04.2 (on VirtualBox 6.1.1 on Windows 10)
Once first connection is stablished wiht broker,
if a loss of connectivity arise (for example shutting down MQTT broker, or deleting default router to internet, or shutting down Ethernet IF)
Linux process unexpectedly ends showing:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x496b78]
It occurs with all transport protocols: tcp, ssl, ws, wss.
It also ocurss in Ubuntu 16.04
However same code compiled in ARM (Raspbian) works correctly.
This is a minimal testing code that reproduce the error. SetKeepAlive and SetPingTimeout are intentionally settled to short times for fast showing the effect. Note than no client activity is performed (other than a dot print).
This is the output few second later you, for any way, you cause a lack (with enough duration) of connectivity.
Notice that after disconnection (¡¡ conexión perdida !! ) a callback OnConnect is ¿erroneously? called.
Thank in advance.
The text was updated successfully, but these errors were encountered: