[
https://issues.apache.org/jira/browse/FTPSERVER-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865114#action_12865114
]
David Latorre commented on FTPSERVER-369:
-----------------------------------------
In my tests, user is not null if you have logged in. And currLogins only gets
incremented after a successful login :) If it wasn't for the "null user" I
would think it is just a race condition for the user count is decremented after
the reply to the QUIT command has been issued - so it is possible that you try
to connect before the logged out user has been removed of the currLogins count.
Could you provide any details about your environment? What version of FTPServer
are you using? Did you implement your own user manager or made any changes to
the codebase?
> 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
> Fix For: 1.0.5, 1.1.0
>
>
> 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.