If there is an open event in disconnect close it. The idea is that by the time we get to the destructor we should be all shut down

This commit is contained in:
Isaac Connor 2021-02-03 17:04:40 -05:00
parent 6ac5472606
commit c61e6a8c56
1 changed files with 4 additions and 0 deletions

View File

@ -1044,6 +1044,10 @@ bool Monitor::disconnect() {
return false;
}
#endif // ZM_MEM_MAPPED
if ( event ) {
Info( "%s: image_count:%d - Closing event %" PRIu64 ", shutting down", name, image_count, event->Id() );
closeEvent();
}
if ( image_buffer ) {
for ( int i = 0; i < image_buffer_count; i++ ) {
// We delete the image because it is an object pointing to space that won't be free'd.