Skip to content

Commit

Permalink
* FIX [mqtt_client] fix #50
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylinYu committed May 11, 2022
1 parent 23749f0 commit 9754536
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mqtt/protocol/mqtt/mqtt_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ mqtt_send_msg(nni_aio *aio, mqtt_ctx_t *arg)
mqtt_sock_t *s = ctx->mqtt_sock;
mqtt_pipe_t *p = s->mqtt_pipe;
uint16_t ptype, packet_id;
uint8_t qos;
uint8_t qos = 0;
nni_msg * msg;
nni_msg * tmsg;

Expand Down Expand Up @@ -308,6 +308,8 @@ mqtt_send_msg(nni_aio *aio, mqtt_ctx_t *arg)
nni_pipe_id(p->pipe), packet_id, msg) != 0) {
// nni_println("Warning! Cache QoS msg failed");
nni_msg_free(msg);
//we finished here since there is no second time
nni_aio_finish_error(aio, MQTT_ERR_NOT_FOUND);
}
break;

Expand Down

0 comments on commit 9754536

Please sign in to comment.