]> git.meshlink.io Git - meshlink/commitdiff
Call stop in close, as stated in documentation.
authorAaron Krebs <aaron.krebs@everbase.net>
Fri, 5 Dec 2014 15:18:46 +0000 (16:18 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sat, 27 Dec 2014 17:38:13 +0000 (18:38 +0100)
src/meshlink.c

index cbe88a3ed256e06f25a72663fc60991ff4189af3..51590200078252a96b4afcf3e14ccd6ab5e67299 100644 (file)
@@ -957,6 +957,9 @@ void meshlink_close(meshlink_handle_t *mesh) {
                return;
        }
 
                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));
 
        // lock is not released after this
        pthread_mutex_lock(&(mesh->mesh_mutex));