Hello,
I am encountering an issue with the SFTP portion of phpseclib where the put() function will sometimes hang indefinitely.
The put call uses the local file method, and is wrapped around logging to show the beginning and end, like this:
print "SFTP START PUT $file\n";
$put = $sftp->put($destination,$file,NET_SFTP_LOCAL_FILE);
print "SFTP PUT COMPLETE\n";
When the SFTP connection is made, the socket timeout is set like this:
stream_set_timeout($sftp->fsock, 30);
It is relatively rare, but perhaps 1 in 500 times the put command will never complete and the script continues on for hours or days until stopped manually. I suspect it is caused by the remote server either dropping the connection or failing in some way but I have not seen a way to program for that scenario.
Thank you.
