gawk

[old] Sed-like interface to the Gopher protocol
Log | Files | Refs | LICENSE

commit 05177ec3488a7ce20153d73f079433684c4631ce
parent 8ba258493b5f1c1d390301d74b59fa7f3923f875
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Mon, 21 Dec 2020 15:28:34 -0800

Fix connections with a delay

Use shutdown(2) in gphsend(). For some reason this was only an issue
when a connection took some time and so my local gopher server
worked fine while WAN requests didn't.

Diffstat:
Mmain.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -240,6 +240,8 @@ gphsend(int sock, const char *request) warn("unable to send request"); return 1; } + if (shutdown(sock, SHUT_WR)) + warn("shutdown"); return 0; }