diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-26 12:43:59 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-26 13:54:08 -0800 |
| commit | e3178bd34ced788b8e16e5e0c3e8f712cd41de6a (patch) | |
| tree | c1793d18f8f5fb596e7301f29984f1d6308bc320 /src/core/tcp.c | |
| parent | fdcb65091eb6c8875bba382072f7f333be972ce1 (diff) | |
| download | nng-e3178bd34ced788b8e16e5e0c3e8f712cd41de6a.tar.gz nng-e3178bd34ced788b8e16e5e0c3e8f712cd41de6a.tar.bz2 nng-e3178bd34ced788b8e16e5e0c3e8f712cd41de6a.zip | |
tcp: use nni_aio_start
Diffstat (limited to 'src/core/tcp.c')
| -rw-r--r-- | src/core/tcp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/tcp.c b/src/core/tcp.c index 75b938b0..119f1f57 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -177,16 +177,15 @@ static void tcp_dialer_dial(void *arg, nng_aio *aio) { tcp_dialer *d = arg; - if (nni_aio_begin(aio) != 0) { - return; - } + + nni_aio_reset(aio); nni_mtx_lock(&d->mtx); if (d->closed) { nni_mtx_unlock(&d->mtx); nni_aio_finish_error(aio, NNG_ECLOSED); return; } - if (!nni_aio_defer(aio, tcp_dial_cancel, d)) { + if (!nni_aio_start(aio, tcp_dial_cancel, d)) { nni_mtx_unlock(&d->mtx); return; } |
