From ce61510127ea60d6f7fb66bf2092c9a4728d3fe1 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Fri, 18 Oct 2013 19:28:20 +0100 Subject: email: Fixed QUIT / LOGOUT being sent when SSL connect fails --- lib/pop3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/pop3.c') 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 */ -- cgit v1.2.3