tlsgate

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

commit b56e1ec6417779514b64ad34dd9a39f21b831e23
parent 0b598fe4c85aa00dbaf247c4a111c3a8a05a4db2
Author: Artem Kobets <artem@akobets.xyz>
Date:   Mon,  7 Sep 2020 13:36:30 +0300

edit comments

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

diff --git a/main.c b/main.c @@ -57,7 +57,7 @@ serve(struct tls *ctx, int cfd, const char *server_host, const char *server_port pfds[1].fd = sfd; pfds[1].events = POLLIN; - // Also check for POLLHUP checking for POLLIN + // when checking POLLIN, also check POLLHUP while (poll(pfds, 2, REQUEST_TIMEOUT) > 0) { if (pfds[0].revents & (pfds[0].events | POLLHUP)) { // read client->proxy @@ -97,7 +97,7 @@ serve(struct tls *ctx, int cfd, const char *server_host, const char *server_port bufp += nwritten; } } else if (pfd[0].revents != 0) { - // POLLERR, POLLNVAL, POLLHUP + // POLLERR, POLLHUP goto cleanup; } } @@ -105,7 +105,7 @@ serve(struct tls *ctx, int cfd, const char *server_host, const char *server_port } } } else if (pfds[0].revents != 0) { - // POLLERR, POLLNVAL + // POLLERR goto cleanup; } @@ -146,7 +146,7 @@ serve(struct tls *ctx, int cfd, const char *server_host, const char *server_port bufp += nwritten; } } else if (pfd[0].revents != 0) { - // POLLERR, POLLNVAL + // POLLERR goto cleanup; } } @@ -154,7 +154,7 @@ serve(struct tls *ctx, int cfd, const char *server_host, const char *server_port } } } else if (pfds[1].revents != 0) { - // POLLERR, POLLNVAL + // POLLERR goto cleanup; } }