if we don't have a connkey, comms will not be open so don't touch the sock file or call checkCommandQueue

This commit is contained in:
Isaac Connor 2019-02-26 10:08:07 -05:00
parent 45778384a6
commit 705468dfc4
1 changed files with 10 additions and 8 deletions

View File

@ -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 )