From 911d4130c6ab1e41e2c57c8ba6454b37633f8750 Mon Sep 17 00:00:00 2001 From: ln-tech Date: Sun, 12 Jan 2020 21:24:14 +0100 Subject: leak fix in main --- src/fuse/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fuse/connection.c') diff --git a/src/fuse/connection.c b/src/fuse/connection.c index f16eb1e..7a28649 100644 --- a/src/fuse/connection.c +++ b/src/fuse/connection.c @@ -31,7 +31,7 @@ static const int FAIL_BACKOFF_START_COUNT = 8; static bool connectionInitDone = false; static bool threadInitDone = false; static pthread_mutex_t mutexInit = PTHREAD_MUTEX_INITIALIZER; -bool keepRunning = true; +atomic_bool keepRunning = true; static bool learnNewServers; // List of pending requests @@ -425,6 +425,7 @@ static void* connection_receiveThreadMain(void *sockPtr) } } } + if(!keepRunning) connection_close(); logadd( LOG_DEBUG1, "Aus der Schleife rausgeflogen! ARRRRRRRRRR" ); fail:; // Make sure noone is trying to use the socket for sending by locking, -- cgit v1.2.3-55-g7522