Skip to content

Commit 19bc7d0

Browse files
committed
Merge pull request #3634 from jes/proto-tls-fd
Stop leaving sockets in CLOSE_WAIT on failed TLS connections (cherry picked from commit fde3ff3)
1 parent 56c5232 commit 19bc7d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/proto_tls/proto_tls.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ static int proto_tls_send(const struct socket_info* send_sock,
622622
return rlen;
623623
con_release:
624624
sh_log(c->hist, TCP_SEND2MAIN, "send 1, (%d)", c->refcnt);
625+
/* close the fd if this process is not meant to own it */
626+
if (c->proc_id != process_no)
627+
close(fd);
625628
tcp_conn_release(c, (rlen < 0)?0:1);
626629
return rlen;
627630
}

0 commit comments

Comments
 (0)