Move shutdown out of linger and make it variable on tlssocks. - geomyidae - a s… | |
git clone git://git.codemadness.org/geomyidae | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ccbe2e7bf5613a77a9e1f2e29ff037c08755cdb0 | |
parent fe5c840d34c12bc38be14397144731b9f46ecec8 | |
Author: Christoph Lohmann <[email protected]> | |
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(-) | |
--- | |
diff --git a/ind.c b/ind.c | |
@@ -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; | |
} | |
diff --git a/main.c b/main.c | |
@@ -1174,6 +1174,8 @@ read_selector_again: | |
} | |
lingersock(tlssocks[tlsclientreader? 0… | |
+ shutdown(tlssocks[tlsclientreader? 0 :… | |
+ tlsclientreader? SHUT_… | |
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) { |