Add a warning when connecting without disconnecting which can cause memleaks
parent
a3078d61f7
commit
ab356a3695
|
@ -880,6 +880,10 @@ std::shared_ptr<Monitor> Monitor::Load(unsigned int p_id, bool load_zones, Purpo
|
|||
}
|
||||
|
||||
bool Monitor::connect() {
|
||||
|
||||
if (mem_ptr != nullptr) {
|
||||
Warning("Already connected. Please call disconnect first.");
|
||||
}
|
||||
Debug(3, "Connecting to monitor. Purpose is %d", purpose);
|
||||
#if ZM_MEM_MAPPED
|
||||
snprintf(mem_file, sizeof(mem_file), "%s/zm.mmap.%d", staticConfig.PATH_MAP.c_str(), id);
|
||||
|
|
Loading…
Reference in New Issue