Skip to content

Commit

Permalink
aio: wrong test for nni_aio_abort
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Dec 7, 2024
1 parent 0e81279 commit e5f6632
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/core/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,12 @@ nni_aio_abort(nni_aio *aio, int rv)
NNI_ASSERT(rv > 0);
nni_mtx_lock(&eq->eq_mtx);
nni_aio_expire_rm(aio);
fn = aio->a_cancel_fn;
arg = aio->a_cancel_arg;
aio->a_cancel_fn = NULL;
aio->a_cancel_arg = NULL;
if (fn != NULL) {
aio->a_abort = true;
aio->a_abort_result = rv;
}
fn = aio->a_cancel_fn;
arg = aio->a_cancel_arg;
aio->a_cancel_fn = NULL;
aio->a_cancel_arg = NULL;
aio->a_abort = true;
aio->a_abort_result = rv;
nni_mtx_unlock(&eq->eq_mtx);

// Stop any I/O at the provider level.
Expand Down

0 comments on commit e5f6632

Please sign in to comment.