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

maxLogin is reached immediately

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.0.5, 1.1.0
    • Core
    • None
    • Linux or Windows

    Description

      I've created a simple program loop which open, connect and disconnect. If the max-logins parameter is set to 10, the message "Too many users logged in, user will be disconnected" is issued after 10 loops

      The cause is in DefaultFtpStatistics. In this function

      public synchronized void setLogout(final FtpIoSession session) {
      User user = session.getUser();
      if (user == null)

      { return; }

      currLogins.decrementAndGet();

      session.getUser() always returns null, so never currLogins.decrementAndGet() is called. My workaround is to put that statement before testing user null state.

      Why session.getUser() return null is out of my knowledge.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--ftp4j-1.5.jar
          64 kB
          Aniceto Pérez y Madrid
        2. ASF.LICENSE.NOT.GRANTED--Main.java
          2 kB
          Aniceto Pérez y Madrid

        Activity

          People

            dlatorre David Latorre
            aperezymadrid Aniceto Pérez y Madrid
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: