Merge pull request #688 from karrots/mqtt-puback-fix
Fix for MQTT PUBACK loop
This commit is contained in:
commit
95e2bbb0f0
|
@ -446,7 +446,7 @@ static void mqtt_socket_sent(void *arg)
|
|||
lua_rawgeti(mud->L, LUA_REGISTRYINDEX, mud->cb_puback_ref);
|
||||
lua_rawgeti(mud->L, LUA_REGISTRYINDEX, mud->self_ref); // pass the userdata to callback func in lua
|
||||
lua_call(mud->L, 1, 0);
|
||||
} else if(node && node->msg_type == MQTT_MSG_TYPE_PUBACK && node->publish_qos == 1) {
|
||||
} else if(node && node->msg_type == MQTT_MSG_TYPE_PUBACK) {
|
||||
msg_destroy(msg_dequeue(&(mud->mqtt_state.pending_msg_q)));
|
||||
} else if(node && node->msg_type == MQTT_MSG_TYPE_PUBCOMP) {
|
||||
msg_destroy(msg_dequeue(&(mud->mqtt_state.pending_msg_q)));
|
||||
|
|
Loading…
Reference in New Issue