From daa3c450d066bbecd76272f7ada7e80f51e2fab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Tomaszewski?= Date: Tue, 4 Sep 2018 08:44:34 +0200 Subject: sftp: don't send post-qoute sequence when retrying a connection Fixes #2939 Closes #2940 --- lib/ssh-libssh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/ssh-libssh.c') diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c index 002e1d96f..88f3aa63e 100644 --- a/lib/ssh-libssh.c +++ b/lib/ssh-libssh.c @@ -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 -- cgit v1.2.3