parent
7512e628b6
commit
dabfe83a7d
|
@ -1037,9 +1037,11 @@ static int mqtt_socket_close( lua_State* L )
|
||||||
// Send disconnect message
|
// Send disconnect message
|
||||||
mqtt_message_t* temp_msg = mqtt_msg_disconnect(&mud->mqtt_state.mqtt_connection);
|
mqtt_message_t* temp_msg = mqtt_msg_disconnect(&mud->mqtt_state.mqtt_connection);
|
||||||
NODE_DBG("Send MQTT disconnect infomation, data len: %d, d[0]=%d \r\n", temp_msg->length, temp_msg->data[0]);
|
NODE_DBG("Send MQTT disconnect infomation, data len: %d, d[0]=%d \r\n", temp_msg->length, temp_msg->data[0]);
|
||||||
|
#ifdef CLIENT_SSL_ENABLE
|
||||||
if(mud->secure)
|
if(mud->secure)
|
||||||
espconn_secure_sent(mud->pesp_conn, temp_msg->data, temp_msg->length);
|
espconn_secure_sent(mud->pesp_conn, temp_msg->data, temp_msg->length);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
espconn_sent(mud->pesp_conn, temp_msg->data, temp_msg->length);
|
espconn_sent(mud->pesp_conn, temp_msg->data, temp_msg->length);
|
||||||
|
|
||||||
mud->mqtt_state.auto_reconnect = 0; // stop auto reconnect.
|
mud->mqtt_state.auto_reconnect = 0; // stop auto reconnect.
|
||||||
|
|
Loading…
Reference in New Issue