Skip to content

Commit 8e5a9e4

Browse files
Don't loop forever ignoring sigterm on initial connect
1 parent b5ee966 commit 8e5a9e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/zmc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,12 @@ int main(int argc, char *argv[]) {
246246

247247
monitor->LoadCamera();
248248

249-
while (!monitor->connect()) {
249+
while (!monitor->connect() and !zm_terminate) {
250250
Warning("Couldn't connect to monitor %d", monitor->Id());
251251
sleep(1);
252252
}
253+
if (zm_terminate) break;
254+
253255
SystemTimePoint now = std::chrono::system_clock::now();
254256
monitor->SetStartupTime(now);
255257

0 commit comments

Comments
 (0)