From 3ca7bcc0edd0f26c33264d32e7b6f07276e72e3c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 7 Dec 2024 19:32:40 -0800 Subject: aio: task_abort was a mistake The use of task_abort to prematurely fail an aio at scheduling time was a mistake, because it could have led to duplicate calls to nng_aio_finish(). We do need to ensure that we leave an indicator so that nni_aio_schedule can return the abort status to caller, in the case that abort is called between the nni_aio_begin and nni_aio_schedule calls. --- 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 5f7ddb69..9491a2fa 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_abort; // Task was aborted bool a_init; // Initialized this nni_task a_task; -- cgit v1.2.3-70-g09d2