]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3c: Increase timeout for PASS to 5 minutes.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 8 Feb 2017 21:01:32 +0000 (23:01 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 8 Feb 2017 21:01:32 +0000 (23:01 +0200)
src/lib-storage/index/pop3c/pop3c-client.c

index 119cb8019c65a1a9fbf934f5cf6e5505a4c34bc2..9cbee3325aa31f9e625147173f1c90031fce8da9 100644 (file)
@@ -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;