aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/smtp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index b8ab8976c..7295e3efa 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1591,11 +1591,13 @@ static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
if(result)
DEBUGF(infof(conn->data, "DO phase failed\n"));
- else
- DEBUGF(infof(conn->data, "DO phase is complete\n"));
+ else {
+ if(*dophase_done) {
+ result = smtp_dophase_done(conn, FALSE /* not connected */);
- if(*dophase_done)
- smtp_dophase_done(conn, FALSE /* not connected */);
+ DEBUGF(infof(conn->data, "DO phase is complete\n"));
+ }
+ }
return result;
}