Pre-programmed sftp session hangs.
Status: Alpha
Brought to you by:
ymnk
shftp session (ChannelSftp class) hangs or operates
incorrectly if the connection is immediately followed by
other commands like upload the files, etc. This is
caused by logical error in the run() method of this class:
it starts the thread that MUST terminate before the other
operations of the session can be started, but it DOES
NOT WAIT for it to end. Under our conditions this thread
takes about 200 msec to terminate, and the bug is only
noticeable in a pre-programmed (not human-guided)
session.
The solution is not to stay in connect() method while the
mentioned thread is running. The file with suggested
corrections is attached.
File with suggested corrections (stays in connect() method until it is safe to return)