Skip to content

Commit

Permalink
* FIX [mqtt/tls_transport] init tmaio in pipe_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylinYu authored and alvin1221 committed Feb 14, 2022
1 parent d187ba1 commit e20cc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt/transport/tls/mqtt_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ mqtts_tcptran_pipe_init(void *arg, nni_pipe *npipe)
p->npipe = npipe;

nni_lmq_init(&p->rslmq, 16);
nni_aio_init(&p->tmaio, mqtts_pipe_timer_cb, p);
p->busy = false;
nni_sleep_aio(p->keepalive, &p->tmaio);
return (0);
Expand Down Expand Up @@ -248,6 +247,7 @@ mqtts_tcptran_pipe_alloc(mqtts_tcptran_pipe **pipep)
return (NNG_ENOMEM);
}
nni_mtx_init(&p->mtx);
nni_aio_init(&p->tmaio, mqtts_pipe_timer_cb, p);
if (((rv = nni_aio_alloc(&p->txaio, mqtts_tcptran_pipe_send_cb, p)) !=
0) ||
((rv = nni_aio_alloc(&p->rxaio, mqtts_tcptran_pipe_recv_cb, p)) !=
Expand Down

0 comments on commit e20cc5a

Please sign in to comment.