From: Timo Sirainen Date: Sat, 18 Oct 2008 17:50:20 +0000 (+0300) Subject: login processes: When shutting down, don't die with fd_send() error message. X-Git-Tag: 1.2.alpha3~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d5a2991421883708143d17eeecd53e72b424283;p=thirdparty%2Fdovecot%2Fcore.git login processes: When shutting down, don't die with fd_send() error message. --HG-- branch : HEAD --- diff --git a/src/login-common/master.c b/src/login-common/master.c index 5b0526e2e9..cb735c802c 100644 --- a/src/login-common/master.c +++ b/src/login-common/master.c @@ -70,6 +70,16 @@ void master_request_login(struct client *client, master_callback_t *callback, i_assert(auth_pid != 0); + if (master_fd == -1) { + struct master_login_reply reply; + + i_assert(closing_down); + memset(&reply, 0, sizeof(reply)); + reply.status = MASTER_LOGIN_STATUS_INTERNAL_ERROR; + callback(client, &reply); + return; + } + data = i_stream_get_data(client->input, &size); cmd_tag_size = client->auth_command_tag == NULL ? 0 : strlen(client->auth_command_tag);