mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DIRMINA-1059) NioProcessor's selector is synchronized but accessed outside
Date Tue, 06 Dec 2016 05:07:58 GMT
Emmanuel Lecharny created DIRMINA-1059:
------------------------------------------

             Summary: 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)

Mime
View raw message