Check that we have a connection to the disk writer before starting to use it in earnest.
[dcpomatic.git] / src / tools / dcpomatic_disk_writer.cc
index 2c3753e57e9c318bae90ee9670859294cee1483c..a2788e18bf0259cb3526335cc88d42cb8345a460 100644 (file)
@@ -460,6 +460,8 @@ try
 
        if (*s == DISK_WRITER_QUIT) {
                exit (EXIT_SUCCESS);
+       } else if (*s == DISK_WRITER_PING) {
+               nanomsg->send(DISK_WRITER_PONG "\n", LONG_TIMEOUT);
        } else if (*s == DISK_WRITER_UNMOUNT) {
                /* XXX: should do Linux polkit stuff here */
                optional<string> xml_head = nanomsg->receive (LONG_TIMEOUT);