aboutsummaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-10-18 19:28:20 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-10-18 19:28:20 +0100
commitce61510127ea60d6f7fb66bf2092c9a4728d3fe1 (patch)
treef3254891e54ef0de31210b06234ddc8799e73037 /lib/pop3.c
parent86c64f3daf0079e96f4694b10fe1bc53944110fc (diff)
email: Fixed QUIT / LOGOUT being sent when SSL connect fails
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index a77193384..59021bba1 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1634,8 +1634,7 @@ static CURLcode pop3_do(struct connectdata *conn, bool *done)
* Disconnect from an POP3 server. Cleanup protocol-specific per-connection
* resources. BLOCKING.
*/
-static CURLcode pop3_disconnect(struct connectdata *conn,
- bool dead_connection)
+static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection)
{
struct pop3_conn *pop3c = &conn->proto.pop3c;
@@ -1645,7 +1644,7 @@ static CURLcode pop3_disconnect(struct connectdata *conn,
/* The POP3 session may or may not have been allocated/setup at this
point! */
- if(!dead_connection && pop3c->pp.conn)
+ 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 */