Unverified Commit daa3c450 authored by Przemysław Tomaszewski's avatar Przemysław Tomaszewski Committed by Daniel Stenberg
Browse files

sftp: don't send post-qoute sequence when retrying a connection

Fixes #2939
Closes #2940
parent 52c13d63
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2390,7 +2390,8 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
    /* Post quote commands are executed after the SFTP_CLOSE state to avoid
       errors that could happen due to open file handles during POSTQUOTE
       operation */
    if(!status && !premature && conn->data->set.postquote) {
    if(!status && !premature && conn->data->set.postquote &&
       !conn->bits.retry) {
        sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
      state(conn, SSH_SFTP_CLOSE);
    }
+2 −1
Original line number Diff line number Diff line
@@ -3219,7 +3219,8 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
    /* Post quote commands are executed after the SFTP_CLOSE state to avoid
       errors that could happen due to open file handles during POSTQUOTE
       operation */
    if(!status && !premature && conn->data->set.postquote) {
    if(!status && !premature && conn->data->set.postquote &&
       !conn->bits.retry) {
      sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
      state(conn, SSH_SFTP_CLOSE);
    }