cherry pick Add check to prevent tight busy loop if ONVIF setup fails
This commit is contained in:
parent
aaaf87abdb
commit
c9db5f44a4
|
@ -1077,7 +1077,7 @@ bool Monitor::connect() {
|
||||||
//ONVIF Setup
|
//ONVIF Setup
|
||||||
#ifdef WITH_GSOAP
|
#ifdef WITH_GSOAP
|
||||||
ONVIF_Trigger_State = FALSE;
|
ONVIF_Trigger_State = FALSE;
|
||||||
if (onvif_event_listener) { //Temporarily using this option to enable the feature
|
if (onvif_event_listener) {
|
||||||
Debug(1, "Starting ONVIF");
|
Debug(1, "Starting ONVIF");
|
||||||
ONVIF_Healthy = FALSE;
|
ONVIF_Healthy = FALSE;
|
||||||
if (onvif_options.find("closes_event") != std::string::npos) { //Option to indicate that ONVIF will send a close event message
|
if (onvif_options.find("closes_event") != std::string::npos) { //Option to indicate that ONVIF will send a close event message
|
||||||
|
@ -3130,7 +3130,7 @@ int Monitor::PrimeCapture() {
|
||||||
|
|
||||||
#ifdef WITH_GSOAP //For now, just don't run the thread if no ONVIF support. This may change if we add other long polling options.
|
#ifdef WITH_GSOAP //For now, just don't run the thread if no ONVIF support. This may change if we add other long polling options.
|
||||||
//ONVIF Thread
|
//ONVIF Thread
|
||||||
if (onvif_event_listener) {
|
if (onvif_event_listener && ONVIF_Healthy) {
|
||||||
if (!Poller) {
|
if (!Poller) {
|
||||||
Poller = zm::make_unique<PollThread>(this);
|
Poller = zm::make_unique<PollThread>(this);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue