diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-24 14:21:57 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-24 14:21:57 +0000 |
commit | ddf7a437de12fab9e000e5b555fdbf1891632dad (patch) | |
tree | 5394719af18289d57ee610ee0b5c03b0bd9478ea /server.c | |
parent | c5edb157405883dc7c869beb2c1e05cefe325fdf (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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--; |