We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c74c77 commit 530d3e0Copy full SHA for 530d3e0
1 file changed
examples/sn-client/sn-client.c
@@ -178,12 +178,15 @@ int sn_test(MQTTCtx *mqttCtx)
178
/* Send Connect and wait for Connect Ack */
179
rc = SN_Client_Connect(&mqttCtx->client, connect);
180
181
+ if (rc != MQTT_CODE_SUCCESS) {
182
+ PRINTF("MQTT-SN Connect: %s (%d)",
183
+ MqttClient_ReturnCodeToString(rc), rc);
184
+ goto disconn;
185
+ }
186
+
187
/* Validate Connect Ack info */
188
PRINTF("....MQTT-SN Connect Ack: Return Code %u",
189
connect->ack.return_code);
- if (rc != MQTT_CODE_SUCCESS) {
- goto disconn;
- }
190
}
191
192
/* Either the register or the subscribe block could be used to get the
0 commit comments