Merge pull request #688 from karrots/mqtt-puback-fix

Fix for MQTT PUBACK loop
This commit is contained in:
Vowstar 2015-11-01 14:34:12 +08:00
commit 95e2bbb0f0
1 changed files with 21 additions and 21 deletions

View File

@ -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)));