From: Timo Sirainen Date: Wed, 8 Feb 2017 21:01:32 +0000 (+0200) Subject: pop3c: Increase timeout for PASS to 5 minutes. X-Git-Tag: 2.3.0.rc1~2153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84cccc6b54d8f92fdee75fe96c63bb67b097eeb3;p=thirdparty%2Fdovecot%2Fcore.git pop3c: Increase timeout for PASS to 5 minutes. --- diff --git a/src/lib-storage/index/pop3c/pop3c-client.c b/src/lib-storage/index/pop3c/pop3c-client.c index 119cb8019c..9cbee3325a 100644 --- a/src/lib-storage/index/pop3c/pop3c-client.c +++ b/src/lib-storage/index/pop3c/pop3c-client.c @@ -438,6 +438,13 @@ pop3c_client_prelogin_input_line(struct pop3c_client *client, const char *line) client->set.host, line); return -1; } + + /* the PASS reply can take a long time. + switch to command timeout. */ + timeout_remove(&client->to); + client->to = timeout_add(POP3C_COMMAND_TIMEOUT_MSECS, + pop3c_client_timeout, client); + o_stream_nsend_str(client->output, t_strdup_printf("PASS %s\r\n", client->set.password)); client->state = POP3C_CLIENT_STATE_PASS;