If monitor has been deleted, we won't be able to connect to it. Show an instructive jpeg and exit.

pull/3703/head
Isaac Connor 2023-05-10 13:06:09 -04:00
parent 6a258dff22
commit 8676da6ead
1 changed files with 6 additions and 0 deletions

View File

@ -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 {