i_close_fd(&fd_client);
return -1;
}
+ /* Send a success notification before we start anything that lasts
+ potentially a long time. imap-hibernate process is waiting for us
+ to answer. Even if we fail later, we log the error anyway. */
+ o_stream_send_str(conn->output, "+\n");
/* NOTE: before client_create_from_input() on failures we need to close
fd_client, but afterward it gets closed by client_destroy() */
if (ret < 0) {
i_error("imap-master(%s): Failed to create client: %s",
input.username, error);
- o_stream_send_str(conn->output, t_strdup_printf(
- "-Failed to create client: %s\n", error));
master_service_client_connection_destroyed(master_service);
i_close_fd(&fd_client);
return -1;
i_error("imap-master: Couldn't add %"PRIuSIZE_T
" bytes to client's input stream",
master_input.client_input->used);
- o_stream_send_str(conn->output,
- "-Couldn't add client input\n");
client_destroy(imap_client, "Client initialization failed");
return -1;
}
timeout_add(0, client_input, imap_client);
}
- o_stream_send_str(conn->output, "+\n");
imap_refresh_proctitle();
/* we'll always disconnect the client afterwards */
return -1;