|Date:||Mon, 4 Feb 2013 14:57:42 +0100|
|From:||Informaticien 4eme <email@example.com>|
Having a way to set a global timeout allows to avoid long freezes when network errors occur.
If I unplug the network cable after being connected and then try to open() a file through SFTP, Net::SSH2 takes about 15 minutes to detect there is a problem and returns.
libssh2 (version 1.2.9) provides libssh2_session_set_timeout() which allows to set a timeout that will affect every action on the session.