mirror of https://github.com/omar-polo/gmid.git
explicitly use c->fd instead of fd
Yep, fd should be the file descriptor, but for lazyness when manually calling the function sometimes we supply 0 as fd and event. Instead of fixing the usage, do as other of such functions do in this circumstances: use c->fd.
This commit is contained in:
parent
89c88caa3c
commit
24d362cd67
4
server.c
4
server.c
|
@ -1109,10 +1109,10 @@ close_conn(int fd, short ev, void *d)
|
||||||
|
|
||||||
switch (tls_close(c->ctx)) {
|
switch (tls_close(c->ctx)) {
|
||||||
case TLS_WANT_POLLIN:
|
case TLS_WANT_POLLIN:
|
||||||
yield_read(fd, c, &close_conn);
|
yield_read(c->fd, c, &close_conn);
|
||||||
return;
|
return;
|
||||||
case TLS_WANT_POLLOUT:
|
case TLS_WANT_POLLOUT:
|
||||||
yield_read(fd, c, &close_conn);
|
yield_read(c->fd, c, &close_conn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue