mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haim Sh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SSHD-316) DefaultSshFuture waits for ever
Date Tue, 29 Apr 2014 09:09:14 GMT
Haim Sh created SSHD-316:
----------------------------

             Summary: DefaultSshFuture waits for ever
                 Key: SSHD-316
                 URL: https://issues.apache.org/jira/browse/SSHD-316
             Project: MINA SSHD
          Issue Type: Bug
    Affects Versions: 0.10.1
            Reporter: Haim Sh


the code for DefaultSshFuture.await0(long timeoutMillis, boolean interruptable) may wait forever.

This happens when curTime == endTime in the main loop.
The loop will not break since it checks: curTime > endTime
and it will re-enter the main loop and call wait(0).

see: 
http://www.javamex.com/tutorials/synchronization_wait_notify_3.shtml

I believe we should change the code DefaultSshFuture:143 to:
curTime >= endTime



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message