You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "David Latorre (JIRA)" <ji...@apache.org> on 2010/05/10 10:58:49 UTC

[jira] Assigned: (FTPSERVER-369) maxLogin is reached immediately

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

David Latorre reassigned FTPSERVER-369:
---------------------------------------

    Assignee: David Latorre

> maxLogin is reached immediately 
> --------------------------------
>
>                 Key: FTPSERVER-369
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-369
>             Project: FtpServer
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.4
>         Environment: Linux or Windows
>            Reporter: Aniceto Pérez y Madrid
>            Assignee: David Latorre
>             Fix For: 1.0.5, 1.1.0
>
>         Attachments: ftp4j-1.5.jar, Main.java
>
>
> 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.
>   

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