[
https://issues.apache.org/jira/browse/SSHD-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet resolved SSHD-66.
---------------------------------
Resolution: Won't Fix
Assignee: Guillaume Nodet
The SshFuture is thread safe and allows the completion of the task before
adding the listener. in such a case the SshFuture#addListnener method will
immediately call the listener (as the task is already finished).
> Race in SshServer.stop can cause it to hang when not closed immediately
> -----------------------------------------------------------------------
>
> Key: SSHD-66
> URL: https://issues.apache.org/jira/browse/SSHD-66
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 0.3.0
> Reporter: Andy Wilkinson
> Assignee: Guillaume Nodet
>
> SshServer.stop calls:
> session.close(immediately).addListener(listener);
> It would appear that the async processing triggered by close(immediately) (in
> this case close(false)) can complete before the listener is added. This means
> that the listener is never notified. This in turn means that the latch is
> never decremented and the following hangs:
> if (!immediately) {
> latch.await();
> }
> Our current workaround is to use stop(true) instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.