REORG/MEDIUM: fd: remove FD_STCLOSE from struct fdtab
In an attempt to get rid of fdtab[].state, and to move the relevant
parts to the connection struct, we remove the FD_STCLOSE state which
can easily be deduced from the <owner> pointer as there is a 1:1 match.
diff --git a/src/session.c b/src/session.c
index 43252b8..e839922 100644
--- a/src/session.c
+++ b/src/session.c
@@ -320,7 +320,7 @@
send(cfd, err_msg->str, err_msg->len, MSG_DONTWAIT|MSG_NOSIGNAL);
}
- if (fdtab[cfd].state != FD_STCLOSE)
+ if (fdtab[cfd].owner)
fd_delete(cfd);
else
close(cfd);