From a7a3046f7cca833e895d58976843663d1df5caba Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 8 Dec 2024 20:38:38 -0800 Subject: endpoints: add transport ep stop functions This should allow us to stop the endpoints early, without freeing them. This ensures that pipe creation has ended before we start tearing down pipes. --- src/core/dialer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/dialer.c') diff --git a/src/core/dialer.c b/src/core/dialer.c index 388d9981..6224ce9b 100644 --- a/src/core/dialer.c +++ b/src/core/dialer.c @@ -541,9 +541,12 @@ nni_dialer_start(nni_dialer *d, unsigned flags) void nni_dialer_stop(nni_dialer *d) { + d->d_ops.d_close(d->d_data); nni_aio_stop(&d->d_tmo_aio); nni_aio_stop(&d->d_con_aio); - d->d_ops.d_close(d->d_data); + if (d->d_ops.d_stop) { + d->d_ops.d_stop(d->d_data); + } } nni_sock * -- cgit v1.2.3-70-g09d2