diff --git a/src/mqtt/protocol/mqtt/mqtt_quic.c b/src/mqtt/protocol/mqtt/mqtt_quic.c index c298835b..9e47f744 100644 --- a/src/mqtt/protocol/mqtt/mqtt_quic.c +++ b/src/mqtt/protocol/mqtt/mqtt_quic.c @@ -1621,7 +1621,7 @@ quic_mqtt_stream_close(void *arg) nni_lmq_flush(&p->recv_messages); if(s->multi_stream) nni_lmq_flush(&p->send_inflight); - // nni_id_map_foreach(&p->sent_unack, mqtt_close_unack_msg_cb); + nni_id_map_foreach(&p->sent_unack, mqtt_close_unack_msg_cb); nni_id_map_foreach(&p->recv_unack, mqtt_close_unack_msg_cb); p->qpipe = NULL; p->ready = false; diff --git a/src/supplemental/mqtt/mqtt_msg.c b/src/supplemental/mqtt/mqtt_msg.c index cdda2458..e991fa8c 100644 --- a/src/supplemental/mqtt/mqtt_msg.c +++ b/src/supplemental/mqtt/mqtt_msg.c @@ -897,10 +897,10 @@ mqtt_close_unack_msg_cb(void *key, void *val) nni_msg * msg = val; nni_aio * aio = NULL; - // aio = nni_mqtt_msg_get_aio(msg); - // if (aio && nni_aio_begin(aio) == true) { - // nni_aio_abort(&aio, NNG_ECLOSED); - // } + aio = nni_mqtt_msg_get_aio(msg); + if (aio) { + nni_aio_finish_error(aio, NNG_ECLOSED); + } nni_msg_free(msg); }