tlsgate

TLS reverse proxy
git clone git://git.akobets.xyz/tlsgate
Log | Files | Refs | README | LICENSE

commit b0f1bdc7d984a4c2525a3011917436d5927bee64
parent 9760ff09a3ba8f0aaf91722317f29c01e14acd8c
Author: Artem Kobets <artem@akobets.xyz>
Date:   Sun, 23 Aug 2020 08:37:49 +0300

bug: set socket timeout for incoming connection

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

diff --git a/main.c b/main.c @@ -153,7 +153,7 @@ main(int argc, char **argv) case 0: close(fd); - if (sock_set_timeout(clientfd, SOCK_TIMEOUT_SECS) == -1) + if (sock_set_timeout(cfd, SOCK_TIMEOUT_SECS) == -1) goto cleanup; /* start tls */ @@ -187,6 +187,7 @@ cleanup: if (clientfd >= 0) close(clientfd); _exit(EXIT_SUCCESS); + break; case -1: warn("fork: %s\n", strerror(errno)); /* fallthrough */