summaryrefslogtreecommitdiffstats
path: root/src/fuse/connection.c
diff options
context:
space:
mode:
authorln-tech2020-01-12 21:24:14 +0100
committerln-tech2020-01-12 21:24:14 +0100
commit911d4130c6ab1e41e2c57c8ba6454b37633f8750 (patch)
tree4dba3d53c591b69fb23fcb87f4f95df7c0248277 /src/fuse/connection.c
parentfixed code: removed useless splicing, code optimization, commandline argument... (diff)
downloaddnbd3-911d4130c6ab1e41e2c57c8ba6454b37633f8750.tar.gz
dnbd3-911d4130c6ab1e41e2c57c8ba6454b37633f8750.tar.xz
dnbd3-911d4130c6ab1e41e2c57c8ba6454b37633f8750.zip
leak fix in main
Diffstat (limited to 'src/fuse/connection.c')
-rw-r--r--src/fuse/connection.c3
1 files changed, 2 insertions, 1 deletions
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,