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)
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.