Skip to content

Commit

Permalink
* FIX [mqtt_quic_client] Fix the null qpipe issue.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <wangwei@emqx.io>
  • Loading branch information
wanghaEMQ committed Sep 27, 2023
1 parent 64666b3 commit d971703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mqtt/protocol/mqtt/mqtt_quic_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,6 @@ mqtt_quic_ctx_send(void *arg, nni_aio *aio)

nni_mtx_lock(&s->mtx);
p = s->pipe;
npipe = p->qpipe;

msg = nni_aio_get_msg(aio);
if (msg == NULL) {
Expand Down Expand Up @@ -1714,6 +1713,7 @@ mqtt_quic_ctx_send(void *arg, nni_aio *aio)
return;
}
} else {
npipe = p->qpipe;
nni_mqtt_msg_set_aio(msg, aio);
if (nni_mqtt_msg_get_packet_type(msg) == NNG_MQTT_SUBSCRIBE) {
nni_lmq_put(s->topic_lmq, msg);
Expand All @@ -1732,7 +1732,7 @@ mqtt_quic_ctx_send(void *arg, nni_aio *aio)
mqtt_pipe_send_msg(aio, msg, pub_pipe, 0);
}
} else {
log_warn("invalid msg type");
log_warn("invalid msg type 0x%x", nni_mqtt_msg_get_packet_type(msg));
}
}
nni_mtx_unlock(&s->mtx);
Expand Down

0 comments on commit d971703

Please sign in to comment.