]> git.sesse.net Git - cubemap/commitdiff
Properly close sockets (and more importantly, kill child processes) on Ctrl-C.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Apr 2023 20:33:39 +0000 (22:33 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Apr 2023 20:33:39 +0000 (22:33 +0200)
main.cpp

index 18976fc833b6d49a981af6fc67e79fe1efa64469..50fd48e729f1df4c47b30755e017b9f2d2c1a0d8 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -623,6 +623,9 @@ start:
        }
        for (const auto &key_and_input_with_refcount : inputs) {
                key_and_input_with_refcount.second.input->stop();
+               if (stopped) {
+                       key_and_input_with_refcount.second.input->close_socket();
+               }
        }
        servers->stop();