| Date: Sat, 12 Aug 2023 21:37:16 +0200
Move shutdown out of linger and make it variable on tlssocks.
Diffstat:
M ind.c | 1 -
M main.c | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
--- |
| @@ -653,7 +653,6 @@ lingersock(int sock)
waitforpendingbytes(sock);
j = 0;
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &j, sizeof(int));
- shutdown(sock, SHUT_RDWR);
return;
} |
| @@ -1174,6 +1174,8 @@ read_selector_again:
}
lingersock(tlssocks[tlsclientreader? 0 : 1]);
+ shutdown(tlssocks[tlsclientreader? 0 : 1],
+ tlsclientreader? SHUT_WR : SHUT_RD);
close(tlssocks[tlsclientreader? 0 : 1]);
if (tlsclientreader) {
@@ -1192,6 +1194,7 @@ read_selector_again:
nocgi, istls);
lingersock(sock);
+ shutdown(sock, SHUT_RDWR);
close(sock);
if (loglvl & CONN) { |