From 8676da6eadbf3c4449a150b1b259ff73ad957b34 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 10 May 2023 13:06:09 -0400 Subject: [PATCH] If monitor has been deleted, we won't be able to connect to it. Show an instructive jpeg and exit. --- src/zm_monitorstream.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index ab2877f25..66e8b2177 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -462,6 +462,8 @@ void MonitorStream::runStream() { if (!checkInitialised()) { if (!loadMonitor(monitor_id)) { sendTextFrame("Not connected"); + } else if (monitor->Deleted()) { + sendTextFrame("Monitor has been deleted"); } else if (monitor->Capturing() == Monitor::CAPTURING_ONDEMAND) { sendTextFrame("Waiting for capture"); } else { @@ -567,6 +569,10 @@ void MonitorStream::runStream() { Debug(1, "Failed Send not connected"); continue; } + } else if (monitor->Deleted()) { + sendTextFrame("Monitor has been deleted"); + zm_terminate = true; + continue; } else if (monitor->Capturing() == Monitor::CAPTURING_ONDEMAND) { if (!sendTextFrame("Waiting for capture")) return; } else {