From 4f940cec0a6a5bcccd3ff0f389b66c169991968c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 30 Nov 2024 08:37:25 -0500 Subject: aio: make sure aio is initialized before certain operations Operations that might be performed during teardown, such as reaping, waiting, closing, freeing, should only be done if the aio has properly been initialized. This is important for certain simple cases where inline aio objects are used, and initialization of an outer object can fail before the enclosed aio is initialized. --- src/core/aio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/aio.h') diff --git a/src/core/aio.h b/src/core/aio.h index f56d2f58..5f7ddb69 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -214,6 +214,7 @@ struct nng_aio { bool a_expire_ok; // Expire from sleep is ok bool a_expiring; // Expiration in progress bool a_use_expire; // Use expire instead of timeout + bool a_init; // Initialized this nni_task a_task; // Read/write operations. -- cgit v1.2.3-70-g09d2