Re: [JSch-users] Timing issue with Remote Port Forwards causing 10 second delay
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2010-08-23 07:38:38
|
Hi, +-From: "B. Scott Smith" <sc...@sm...> -- |_Date: Fri, 13 Aug 2010 11:40:34 -0400 ___________ | |I have found a timing issue with reverse port forwarding |(session.setPortForwardingR). This is affecting my application when it |is running on the same physical box as the SSH server. My application |sets up a series of remote forwards, and I noticed that calls to |session.setPortForwardingR() take a very long time (exactly 10 seconds |to be precise). This is because the reply from the SSH server is being |received before the sending thread is ready (sleeping). So, the thread |interrupt never occurs, and the sending thread sleeps for the full 10 |seconds. |I have resolved the issue by replacing the sleep/interrupt logic with a |simple synchronized reply lock. I have attached the patch diffs to |0.1.43 below. Thank you for your feedback. I'll check it out. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ Twitter: @ymnk |