1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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

Fixes #2939
Closes #2940
This commit is contained in:
Przemysław Tomaszewski 2018-09-04 08:44:34 +02:00 committed by Daniel Stenberg
parent 52c13d6328
commit daa3c450d0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 3 deletions

View File

@ -2390,8 +2390,9 @@ 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) {
sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
if(!status && !premature && conn->data->set.postquote &&
!conn->bits.retry) {
sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
state(conn, SSH_SFTP_CLOSE);
}
else

View File

@ -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);
}