touch the zms lock file every hour so that we can determine which ones are stale

This commit is contained in:
Isaac Connor committed 2018-09-21 15:58:14 -04:00
1 parent f61a1b7ebd
commit c8549e41da
4 files changed
+15

No files matched your search

+6
View File
@@ -755,6 +755,12 @@ void EventStream::runStream() {
// commands may set send_frame to true
while(checkCommandQueue());
// 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 )
curr_frame_id += step;
+6
View File
@@ -531,6 +531,12 @@ void MonitorStream::runStream() {
Debug(2, "Have checking command Queue for connkey: %d", connkey );
got_command = true;
}
// 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 ( paused ) {
+2
View File
@@ -313,6 +313,8 @@ void StreamBase::openComms() {
snprintf(rem_sock_path, sizeof(rem_sock_path), "%s/zms-%06dw.sock", staticConfig.PATH_SOCKS.c_str(), connkey);
strncpy(rem_addr.sun_path, rem_sock_path, sizeof(rem_addr.sun_path)-1);
rem_addr.sun_family = AF_UNIX;
gettimeofday(&last_comm_update, NULL);
} // end if connKey > 0
Debug(2, "comms open");
} // end void StreamBase::openComms()
+1
View File
@@ -85,6 +85,7 @@ protected:
int step;
struct timeval now;
struct timeval last_comm_update;
double base_fps;
double effective_fps;