mirror of https://github.com/omar-polo/gmid.git
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:
parent
c5edb15740
commit
ddf7a437de
4
server.c
4
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--;
|
||||
|
|
Loading…
Reference in New Issue