From 24d362cd67c3eba1ce1a6af67eb71b6fce469411 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sat, 12 Jun 2021 13:42:43 +0000 Subject: [PATCH] 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. --- server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.c b/server.c index 7172f30..5bc0ff5 100644 --- a/server.c +++ b/server.c @@ -1109,10 +1109,10 @@ close_conn(int fd, short ev, void *d) switch (tls_close(c->ctx)) { case TLS_WANT_POLLIN: - yield_read(fd, c, &close_conn); + yield_read(c->fd, c, &close_conn); return; case TLS_WANT_POLLOUT: - yield_read(fd, c, &close_conn); + yield_read(c->fd, c, &close_conn); return; }