Commit 99246d6
authored
Fix ClientChannelEvent.Timeout and ClientSessionEvent.TIMEOUT (#790)
Fix AbstractClientChannel.waitFor() and ClientSessionImpl.waitFor(); they could time-out much too early.
On some hosts, on which waiting for the `futureLock.wait(remWait)` is faster than 1 millisecond, `remWait` gets reduced by 123 milliseconds although not even one passed. This causes a `ClientChannelEvent.Timeout` or `ClientSessionEvent.TIMEOUT` after a much smaller time passed than the configured timeout.
With these changes, the `remWait` is calculated based on the milliseconds passed instead of transformed nanoseconds.1 parent 2868de8 commit 99246d6
2 files changed
Lines changed: 2 additions & 18 deletions
File tree
- sshd-core/src/main/java/org/apache/sshd/client
- channel
- session
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 293 | | |
302 | 294 | | |
303 | 295 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
266 | 265 | | |
267 | 266 | | |
268 | 267 | | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | 297 | | |
306 | 298 | | |
307 | 299 | | |
| |||
0 commit comments