]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: If status write() fails permanently, remove IO_WRITE handler
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 14 Apr 2022 15:17:30 +0000 (17:17 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 4 May 2022 05:44:00 +0000 (05:44 +0000)
This prevents rapidly looping to the function in case the IO is set.

src/lib-master/master-service.c

index 5d82bed875f5e57c9a9dd29ba4b358c1ad65bbf1..e094aad22232588ac39e46f77469a5582145aa01 100644 (file)
@@ -1793,11 +1793,13 @@ master_status_send(struct master_service *service, bool important_update)
                /* shouldn't happen? */
                i_error("write(master_status_fd) returned %d", (int)ret);
                service->master_status.pid = 0;
+               io_remove(&service->io_status_write);
        } else if (errno != EAGAIN) {
                /* failure */
                if (errno != EPIPE)
                        i_error("write(master_status_fd) failed: %m");
                service->master_status.pid = 0;
+               io_remove(&service->io_status_write);
        } else if (important_update) {
                /* reader is busy, but it's important to get this notification
                   through. send it when possible. */