Commit 15765484 authored by Steve Holme's avatar Steve Holme
Browse files

imap_doing: don't call imap_dophase_done() if already failed

Applied the POP3 fix from commit 2897ce7d so imap_dophase_done()
isn't called if imap_multi_statemach() fails.
parent 36837c10
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1049,12 +1049,13 @@ static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done)

  if(result)
    DEBUGF(infof(conn->data, "DO phase failed\n"));

  else {
    if(*dophase_done) {
      result = imap_dophase_done(conn, FALSE /* not connected */);

      DEBUGF(infof(conn->data, "DO phase is complete\n"));
    }
  }

  return result;
}