aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-03-12 23:02:04 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-12 23:02:04 +0100
commitcccba72920ace26f1ecdf496546a2441304df410 (patch)
tree8fa3efab6d26ae9e7667b011b4024357eb1e1cb0 /lib
parent7612ca2a7e9f0230ab4166e8b0a5abb2557d242c (diff)
sftp upload: expire to advance state machine
When using the multi_socket API to do SFTP upload, it is important that we set a quick expire when leaving the SSH_SFTP_UPLOAD_INIT state as there's nothing happening on the socket so there's no read or write to wait for, but the next libssh2 API function needs to be called to get the ball rolling. This is one of the problems detected by test 582. Reported by: Henry Ludemann <misc@hl.id.au>
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 1aaa112b4..e67dbdd8e 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1599,6 +1599,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
figure out a "real" bitmask */
sshc->orig_waitfor = data->req.keepon;
+ /* since we don't really wait for anything at this point, we want the
+ state machine to move on as soon as possible so we set a very short
+ timeout here */
+ Curl_expire(data, 1);
+
state(conn, SSH_STOP);
}
break;