Skip to content

Commit dadcade

Browse files
committed
* FIX [broker_tcp] prevent cache msg from a closed pipe
Signed-off-by: Jaylin <jaylin@emqx.io>
1 parent 87c87d7 commit dadcade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sp/transport/mqtt/broker_tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ tcptran_pipe_send(void *arg, nni_aio *aio)
15491549
}
15501550
nni_mtx_lock(&p->mtx);
15511551
nni_msg *msg = nni_aio_get_msg(aio);
1552-
if (msg == NULL || p->tcp_cparam == NULL) {
1552+
if (msg == NULL || p->tcp_cparam == NULL || p->closed == true) {
15531553
log_error("sending NULL msg or pipe is invalid!");
15541554
nni_mtx_unlock(&p->mtx);
15551555
if(msg) {

0 commit comments

Comments
 (0)