calling resume() on listener does has no effect
-----------------------------------------------

                 Key: FTPSERVER-208
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-208
             Project: FtpServer
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0-M3
         Environment: Windows XP, Sun 1.5.0 JVM
            Reporter: Gary Bell


Calling resume() method on the default NioListener after it has been suspended 
has no effect. Attempting to connect to the server results in connection 
refused messages to the client.

I believe the problem is because the suspend() method does not set the 
suspended variable to true after the acceptor.unbind() call. This value is 
checked by the resume() method which only resumes the listener when the value 
is true.

=== copied from current svn HEAD ===

public synchronized void suspend() {
        if (acceptor != null && !suspended) {
            acceptor.unbind(address);
           
        }
    }

public synchronized void resume() {
        if (acceptor != null && suspended) {
            try {
                acceptor.bind(address);
            } catch (IOException e) {
                LOG.error("Failed to resume listener", e);
            }
        }
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to