You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2016/12/06 07:46:58 UTC

[jira] [Resolved] (DIRMINA-1059) NioProcessor's selector is synchronized but accessed outside

     [ https://issues.apache.org/jira/browse/DIRMINA-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRMINA-1059.
----------------------------------------
    Resolution: Fixed

Fixed with http://git-wip-us.apache.org/repos/asf/mina/commit/bf0254f3

> NioProcessor's selector is synchronized but accessed outside
> ------------------------------------------------------------
>
>                 Key: DIRMINA-1059
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1059
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.16
>            Reporter: Emmanuel Lecharny
>             Fix For: 2.0.17
>
>
> We synchronize on the {{selector}} field in {{NioProcessor}}, but this field is accessed without synchronization :
> {noformat}
>     protected void doDispose() throws Exception {
>         selector.close();
>     }
> {noformat}
> and :
> {noformat}
>     protected boolean isBrokenConnection() throws IOException {
>         // A flag set to true if we find a broken session
>         boolean brokenSession = false;
>         synchronized (selector) {
>             ...
> {noformat}
> We should use another lock mechanism.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)