Skip to content

Commit ca0dc9d

Browse files
authored
Add MG_F_SEND_AND_CLOSE flag to disconnect
1 parent 743f017 commit ca0dc9d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mgos_mqtt_conn.c

+1
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ void mgos_mqtt_conn_disconnect(struct mgos_mqtt_conn *c) {
491491
c->reconnect_timeout_ms = -1; // Prevent reconnect.
492492
if (c->nc != NULL) {
493493
mg_mqtt_disconnect(c->nc);
494+
c->nc->flags |= MG_F_SEND_AND_CLOSE;
494495
}
495496
}
496497

0 commit comments

Comments
 (0)