wolfSSL / wolfMQTT

wolfMQTT is a small, fast, portable MQTT client implementation, including support for TLS 1.3.
https://www.wolfssl.com
GNU General Public License v2.0
521 stars 155 forks source link

Return correct error code in SN_Client_Connect #268

Closed lealem47 closed 2 years ago

lealem47 commented 2 years ago

Preventing the SN_ConnectAck return_code from being 0 when an early error occurs.

This PR sets the SN_ConnectAck return code in SN_Client_Connect() to the rc error code if rc isn't 0, in case the switch statement in the function breaks before SN_Client_HandlePacket() is called.