aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-24 14:21:57 +0000
committerOmar Polo <op@omarpolo.com>2023-06-24 14:21:57 +0000
commitddf7a437de12fab9e000e5b555fdbf1891632dad (patch)
tree5394719af18289d57ee610ee0b5c03b0bd9478ea /server.c
parentc5edb157405883dc7c869beb2c1e05cefe325fdf (diff)
fix client_close_ev when tls_close() returns TLS_WANT_POLLIN/OUT
in those cases we need to reschedule the function and return, instead of going on with the cleanup.
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c
index ea2eb60..2d77353 100644
--- a/server.c
+++ b/server.c
@@ -1244,10 +1244,10 @@ client_close_ev(int fd, short event, void *d)
switch (tls_close(c->ctx)) {
case TLS_WANT_POLLIN:
event_once(c->fd, EV_READ, client_close_ev, c, NULL);
- break;
+ return;
case TLS_WANT_POLLOUT:
event_once(c->fd, EV_WRITE, client_close_ev, c, NULL);
- break;
+ return;
}
connected_clients--;