commit b0d7e859556751c043494be4ca63ded24c8e72fa
parent 14d0cfe19ee447ec6f4d5d171a360591c31838a9
Author: Yersa Nordman <yersa@finwo.nl>
Date: Wed, 25 Oct 2023 22:40:10 +0200
Actually mark a connection as closed
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/fnet.c b/src/fnet.c
@@ -634,6 +634,8 @@ FNET_RETURNCODE fnet_close(const struct fnet_t *connection) {
conn->epev = NULL;
}
+ conn->ext.status = FNET_STATUS_CLOSED;
+
if (conn->ext.onClose) {
conn->ext.onClose(&((struct fnet_ev){
.connection = (struct fnet_t *)conn,
@@ -645,8 +647,6 @@ FNET_RETURNCODE fnet_close(const struct fnet_t *connection) {
conn->ext.onClose = NULL;
}
- // TODO: set closed flag
-
return FNET_RETURNCODE_OK;
}