You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2009/05/30 23:11:02 UTC
svn commit: r780325 -
/mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java
Author: ngn
Date: Sat May 30 21:11:01 2009
New Revision: 780325
URL: http://svn.apache.org/viewvc?rev=780325&view=rev
Log:
Fixed incorrect comparison of the user level idle time and the listener idle time of the user level is set to be unlimited (FTPSERVER-308)
Modified:
mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java
Modified: mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java?rev=780325&r1=780324&r2=780325&view=diff
==============================================================================
--- mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java (original)
+++ mina/ftpserver/trunk/core/src/main/java/org/apache/ftpserver/impl/FtpIoSession.java Sat May 30 21:11:01 2009
@@ -620,7 +620,11 @@
int listenerTimeout = getListener().getIdleTimeout();
// the listener timeout should be the upper limit, unless set to unlimited
- if(listenerTimeout <= 0 || maxIdleTime < listenerTimeout) {
+ // if the user limit is set to be unlimited, use the listener value is the threshold
+ // (already used as the default for all sessions)
+ // else, if the user limit is less than the listener idle time, use the user limit
+ if(listenerTimeout <= 0 ||
+ (maxIdleTime > 0 && maxIdleTime < listenerTimeout)) {
wrappedSession.getConfig().setBothIdleTime(maxIdleTime);
}
}