diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 8a1aabe63..8c097fb29 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1052,6 +1052,7 @@ bool Monitor::disconnect() { return true; } + shared_data->valid = false; #if ZM_MEM_MAPPED msync(mem_ptr, mem_size, MS_ASYNC); munmap(mem_ptr, mem_size);