From 705468dfc4a568d6bf32f45e8e801e6228802ac9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 26 Feb 2019 10:08:07 -0500 Subject: [PATCH] if we don't have a connkey, comms will not be open so don't touch the sock file or call checkCommandQueue --- src/zm_eventstream.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/zm_eventstream.cpp b/src/zm_eventstream.cpp index 52b825d86..e14c1fb81 100644 --- a/src/zm_eventstream.cpp +++ b/src/zm_eventstream.cpp @@ -761,15 +761,17 @@ void EventStream::runStream() { unsigned int delta_us = 0; send_frame = false; - // commands may set send_frame to true - while ( checkCommandQueue() && !zm_terminate ) { - // The idea is to loop here processing all commands before proceeding. - } + if ( connkey ) { + // commands may set send_frame to true + while ( checkCommandQueue() && !zm_terminate ) { + // The idea is to loop here processing all commands before proceeding. + } - // Update modified time of the socket .lock file so that we can tell which ones are stale. - if ( now.tv_sec - last_comm_update.tv_sec > 3600 ) { - touch(sock_path_lock); - last_comm_update = now; + // Update modified time of the socket .lock file so that we can tell which ones are stale. + if ( now.tv_sec - last_comm_update.tv_sec > 3600 ) { + touch(sock_path_lock); + last_comm_update = now; + } } if ( step != 0 )