Close monitor after terminating threads instead of before
parent
e237719d6a
commit
14c06cd2d4
|
@ -403,9 +403,6 @@ int main(int argc, char *argv[]) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( int i = 0; i < n_monitors; i++ ) {
|
|
||||||
monitors[i]->Close();
|
|
||||||
}
|
|
||||||
// Killoff the analysis threads. Don't need them spinning while we try to reconnect
|
// Killoff the analysis threads. Don't need them spinning while we try to reconnect
|
||||||
for ( int i = 0; i < n_monitors; i++ ) {
|
for ( int i = 0; i < n_monitors; i++ ) {
|
||||||
if ( analysis_threads[i] ) {
|
if ( analysis_threads[i] ) {
|
||||||
|
@ -426,6 +423,9 @@ int main(int argc, char *argv[]) {
|
||||||
rtsp_server_threads = nullptr;
|
rtsp_server_threads = nullptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
for ( int i = 0; i < n_monitors; i++ ) {
|
||||||
|
monitors[i]->Close();
|
||||||
|
}
|
||||||
delete [] alarm_capture_delays;
|
delete [] alarm_capture_delays;
|
||||||
delete [] capture_delays;
|
delete [] capture_delays;
|
||||||
delete [] last_capture_times;
|
delete [] last_capture_times;
|
||||||
|
|
Loading…
Reference in New Issue