If the state machine isn't complete, didn't fail and it didn't return
due to blocking it can just as well loop again.
This addresses the problem with SFTP directory listings where we would
otherwise return back to the parent and as the multi state machine
doesn't have any code for using CURLM_CALL_MULTI_PERFORM for as long the
doing phase isn't complete, it would return out when in reality there
was more data to deal with.
Directory listing is wery slow when connecting to a SFTP server with CURLOPT_TIMEOUT or -m cmd option. Without a timeout everything works fast.
Tested on my Mac (macos 10.14.2) when connecting to other Mac with curl v7.64.0 (or with daily snapshot 20190129) with following command:
curl sftp://<host>/ -m 20 -u <user>
There is some delay for loading of each subdirectory/file.
In curl v7.61.0 the same command performs almost instantly.
After some investigation I found that the bug was introduced with changes to lib/ssh.c in commit 1a89099
The text was updated successfully, but these errors were encountered: