Catch assert in TcpMsg.c , line no
Answer
9/14/18 10:58 AM

Hello,

i'm trying to build an MQTT-application which is immune to connection losses.

Currently i'm getting an asserted at Filename 3rd-party/ServalStack/src/Msg/TcpMsg.c , line no  91 -error if i provocate a loss of connectivity or the WiFi-Signal - is there any proper way to avoid this assertion, and rebuild the MQTT-Session until it worked? Currently i'm trying to go into a reconnect-loop every time when i get an Event like MQTT_DISCONNECT_SEND_FAILED occurs.

Thank you and best regards,

Marvin

0 (0 Votes)
RE: Catch assert in TcpMsg.c , line no
Answer
9/17/18 1:07 PM as a reply to Marvin G..
Hello Marvin,

First, I would like to welcome you to the XDK community.

There is indeed an approach to avoid this assertion available. For that, the function TcpMsg_receiveFromTcp() would need to be modified to behave different in case of a loss of the Wi-Fi connection or MQTT broker connection.

How to modify it, is explained in detail in this thread here . I recommend to take a look at it.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Votes)