Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-134

MinaListener should correctly set the port after bind() in start()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.0-M2
    • Core
    • None
    • Linux

    Description

      In the start() method, once the acceptor.bind(address) call is executed the listener might end up listening on a port different than the one supplied. This is true for the case where user specifies 0 as the port setting to enable the OS to pick a free port.

      When embedding FTPServer in an application there is no way of finding out what port the listener ended up listening on.

      Following is a simple suggested fix and should be added at the end of the MinaListener.start() method after the acceptor.bind(address) call.

      setPort(acceptor.getLocalAddress().getPort());

      This will allow application code to correctly retrieve the port where the listener ended up listening.

      Attachments

        Activity

          People

            niklas Niklas Therning
            ankur Ankur Bansal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: