Skip to content

Commit d14a301

Browse files
authored
Merge pull request #1 from XuSenfeng/patch-1
Update mqttclient.c
2 parents d205659 + ee660ea commit d14a301

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mqttclient/mqttclient.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,12 +1035,11 @@ static int mqtt_connect_with_results(mqtt_client_t* c)
10351035
exit:
10361036
if (rc == MQTT_SUCCESS_ERROR) {
10371037
if(NULL == c->mqtt_thread) {
1038-
1038+
mqtt_set_client_state(c, CLIENT_STATE_CONNECTED);
10391039
/* connect success, and need init mqtt thread */
10401040
c->mqtt_thread= platform_thread_init("mqtt_yield_thread", mqtt_yield_thread, c, MQTT_THREAD_STACK_SIZE, MQTT_THREAD_PRIO, MQTT_THREAD_TICK);
10411041

10421042
if (NULL != c->mqtt_thread) {
1043-
mqtt_set_client_state(c, CLIENT_STATE_CONNECTED);
10441043
platform_thread_startup(c->mqtt_thread);
10451044
platform_thread_start(c->mqtt_thread); /* start run mqtt thread */
10461045
} else {

0 commit comments

Comments
 (0)