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.
This commit is contained in:
Omar Polo 2023-06-24 14:21:57 +00:00
parent c5edb15740
commit ddf7a437de
1 changed files with 2 additions and 2 deletions

View File

@ -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--;