From: Timo Sirainen Date: Thu, 14 Apr 2022 15:17:30 +0000 (+0200) Subject: lib-master: If status write() fails permanently, remove IO_WRITE handler X-Git-Tag: 2.4.0~4085 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=956c732343d08512cf32ab4b27775fa6f03fe858;p=thirdparty%2Fdovecot%2Fcore.git lib-master: If status write() fails permanently, remove IO_WRITE handler This prevents rapidly looping to the function in case the IO is set. --- diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index 5d82bed875..e094aad222 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -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. */