Don't exit(0) on QUIT. Instead set zm_terminate=true so that all the cleanup routines run.
This commit is contained in:
parent
9b723d73a1
commit
e3d2b14b69
|
@ -229,6 +229,7 @@ void MonitorStream::processCommand(const CmdMsg *msg) {
|
||||||
break;
|
break;
|
||||||
case CMD_QUIT :
|
case CMD_QUIT :
|
||||||
Info("User initiated exit - CMD_QUIT");
|
Info("User initiated exit - CMD_QUIT");
|
||||||
|
zm_terminate = true;
|
||||||
break;
|
break;
|
||||||
case CMD_QUERY :
|
case CMD_QUERY :
|
||||||
Debug(1, "Got QUERY command, sending STATUS");
|
Debug(1, "Got QUERY command, sending STATUS");
|
||||||
|
@ -315,16 +316,6 @@ void MonitorStream::processCommand(const CmdMsg *msg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug(2, "Number of bytes sent to (%s): (%d)", rem_addr.sun_path, nbytes);
|
Debug(2, "Number of bytes sent to (%s): (%d)", rem_addr.sun_path, nbytes);
|
||||||
|
|
||||||
// quit after sending a status, if this was a quit request
|
|
||||||
if ( (MsgCommand)msg->msg_data[0] == CMD_QUIT ) {
|
|
||||||
zm_terminate = true;
|
|
||||||
Debug(2, "Quitting");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Debug(2,"Updating framerate");
|
|
||||||
//updateFrameRate(monitor->GetFPS());
|
|
||||||
} // end void MonitorStream::processCommand(const CmdMsg *msg)
|
} // end void MonitorStream::processCommand(const CmdMsg *msg)
|
||||||
|
|
||||||
bool MonitorStream::sendFrame(const char *filepath, const timeval ×tamp) {
|
bool MonitorStream::sendFrame(const char *filepath, const timeval ×tamp) {
|
||||||
|
|
Loading…
Reference in New Issue