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 2008/04/18 10:58:15 UTC

svn commit: r649415 - /mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java

Author: ngn
Date: Fri Apr 18 01:58:02 2008
New Revision: 649415

URL: http://svn.apache.org/viewvc?rev=649415&view=rev
Log:
Simple fix for a potential race condition when the timer looks for stale connections

Modified:
    mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java

Modified: mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java?rev=649415&r1=649414&r2=649415&view=diff
==============================================================================
--- mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java (original)
+++ mina/ftpserver/branches/branch_1.4/core/src/java/org/apache/ftpserver/FtpSessionImpl.java Fri Apr 18 01:58:02 2008
@@ -56,7 +56,9 @@
     private int maxIdleTime = 0;
     private long connectionTime = 0L;
     private long loginTime = 0L;
-    private long lastAccessTime = 0L;
+    
+    // make sure init this as the session is created or the session might get collected for idle disconnect
+    private long lastAccessTime = System.currentTimeMillis(); 
     
     private IODataConnectionFactory dataConnection;
     private FileSystemView fileSystemView;