Hi there,

just stumbled over a connect timeout issue and wanne let you know...
I have an situation where connecting can take long so i want to  
increase the connect timeout.
Tried to do that with session.connect(int timeout) but the connect  
failed after exactly the same time, no matter what i set timeout to.
Looking at the jsch code i realized that it does not use the socket  
connect timeout (like described here: 
http://blog.taragana.com/index.php/archive/how-to-open-client-socket-with-timeout/)
 
, but starts an thread which stops the read after the given timeout. I  
guess the thread mechanism is a safe way in some circumstances but  
setting additionally the connect timeout to the socket would allow to  
increase standard socket connect timeout!

After all i simply implemented an SocketFactory to set the timeout!
best regards
Johannes


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to