commit 1f4751b43d6ee518cab167f19483f14b1e09f864
parent a69823f7fcdaf0b301d2c7ac703b07658d5024cf
Author: Yersa Nordman <yersa@finwo.nl>
Date: Thu, 26 Oct 2023 22:28:06 +0200
Close all remaining connections when fnet_shutdown is called
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/fnet.c b/src/fnet.c
@@ -746,6 +746,8 @@ FNET_RETURNCODE fnet_main() {
}
+ while(connections) fnet_free(connections);
+
return FNET_RETURNCODE_OK;
}
diff --git a/test.c b/test.c
@@ -15,6 +15,7 @@ int ticked = 0;
void onClose(struct fnet_ev *ev) {
printf("Connection closed!\n");
+ fnet_shutdown();
}
void onData(struct fnet_ev *ev) {