You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2006/07/21 18:27:42 UTC

svn commit: r424374 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Author: fhanik
Date: Fri Jul 21 09:27:42 2006
New Revision: 424374

URL: http://svn.apache.org/viewvc?rev=424374&view=rev
Log:
Dereference socket after its been used

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=424374&r1=424373&r2=424374&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Jul 21 09:27:42 2006
@@ -1333,7 +1333,6 @@
 
             // Process requests until we receive a shutdown signal
             while (running) {
-
                 // Wait for the next socket to be assigned
                 SocketChannel socket = await();
                 if (socket == null)
@@ -1357,12 +1356,11 @@
                         log.error("",x);
                     }
                 }
-
+                //dereference socket to let GC do its job
+                socket = null;
                 // Finish up this request
                 recycleWorkerThread(this);
-
             }
-
         }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org