aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-06-12 13:42:43 +0000
committerOmar Polo <op@omarpolo.com>2021-06-12 13:42:43 +0000
commit24d362cd67c3eba1ce1a6af67eb71b6fce469411 (patch)
tree23e8be77c58e76c6d4193c85c148bae75d1f6ec0 /server.c
parent89c88caa3c023d5194e0d572ae99ab006557cbf3 (diff)
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.
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files 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;
}