From: Timo Sirainen Date: Fri, 20 Sep 2013 01:20:22 +0000 (+0300) Subject: ssl-params: Long-running ssl-params process shouldn't cause Dovecot restart to fail. X-Git-Tag: 2.2.6~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=586ad46d25d782a4c7895ee88ba640651c0525b7;p=thirdparty%2Fdovecot%2Fcore.git ssl-params: Long-running ssl-params process shouldn't cause Dovecot restart to fail. --- diff --git a/src/ssl-params/ssl-params.c b/src/ssl-params/ssl-params.c index 996c25b6f3..b6849db23c 100644 --- a/src/ssl-params/ssl-params.c +++ b/src/ssl-params/ssl-params.c @@ -5,6 +5,7 @@ #include "buffer.h" #include "file-lock.h" #include "read-full.h" +#include "master-service.h" #include "master-service-settings.h" #include "ssl-params-settings.h" #include "ssl-params.h" @@ -118,7 +119,9 @@ static void ssl_params_rebuild(struct ssl_params *param) case -1: i_fatal("fork() failed: %m"); case 0: - /* child */ + /* child - close listener fds so a long-running ssl-params + doesn't cause Dovecot restart to fail */ + master_service_stop_new_connections(master_service); ssl_params_if_unchanged(param->path, param->last_mtime); exit(0); default: