]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login processes: When shutting down, don't die with fd_send() error message.
authorTimo Sirainen <tss@iki.fi>
Sat, 18 Oct 2008 17:50:20 +0000 (20:50 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 18 Oct 2008 17:50:20 +0000 (20:50 +0300)
--HG--
branch : HEAD

src/login-common/master.c

index 5b0526e2e9e72b8a0552da294f92bb03ef2f5f0e..cb735c802cdc291e5e2f25929d0b860cad282ee9 100644 (file)
@@ -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);