summaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-12-14 09:21:47 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-12-17 12:33:00 +0100
commit154a17b6ee5097642e2330fb14ba52e317b95430 (patch)
tree51aa928bc4a5cecee4cde482e54ad89c5c080baf /lib/pop3.c
parent9e6518481cd4e2603b4f9e04d6cfd1a214a72726 (diff)
downloadcurl-154a17b6ee5097642e2330fb14ba52e317b95430.tar.gz
pingpong: ignore regular timeout in disconnect phase
The timeout set with CURLOPT_TIMEOUT is no longer used when disconnecting from one of the pingpong protocols (FTP, IMAP, SMTP, POP3). Reported-by: jasal82 on github Fixes #3264 Closes #3374
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 05853f001..d755e81e0 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1025,19 +1025,20 @@ static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done)
return result;
}
- result = Curl_pp_statemach(&pop3c->pp, FALSE);
+ result = Curl_pp_statemach(&pop3c->pp, FALSE, FALSE);
*done = (pop3c->state == POP3_STOP) ? TRUE : FALSE;
return result;
}
-static CURLcode pop3_block_statemach(struct connectdata *conn)
+static CURLcode pop3_block_statemach(struct connectdata *conn,
+ bool disconnecting)
{
CURLcode result = CURLE_OK;
struct pop3_conn *pop3c = &conn->proto.pop3c;
while(pop3c->state != POP3_STOP && !result)
- result = Curl_pp_statemach(&pop3c->pp, TRUE);
+ result = Curl_pp_statemach(&pop3c->pp, TRUE, disconnecting);
return result;
}
@@ -1235,7 +1236,7 @@ static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection)
point! */
if(!dead_connection && pop3c->pp.conn && pop3c->pp.conn->bits.protoconnstart)
if(!pop3_perform_quit(conn))
- (void)pop3_block_statemach(conn); /* ignore errors on QUIT */
+ (void)pop3_block_statemach(conn, TRUE); /* ignore errors on QUIT */
/* Disconnect from the server */
Curl_pp_disconnect(&pop3c->pp);