From af427dfac6b084eeb59330ecc9491a0e30c4b36d Mon Sep 17 00:00:00 2001 From: Aaron Krebs Date: Fri, 5 Dec 2014 16:18:46 +0100 Subject: [PATCH] Call stop in close, as stated in documentation. --- src/meshlink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/meshlink.c b/src/meshlink.c index cbe88a3e..51590200 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -957,6 +957,9 @@ void meshlink_close(meshlink_handle_t *mesh) { return; } + // stop can be called even if mesh has not been started + meshlink_stop(mesh); + // lock is not released after this pthread_mutex_lock(&(mesh->mesh_mutex)); -- 2.39.5