Dereference socket after its been used
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 21 Jul 2006 16:27:42 +0000 (16:27 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 21 Jul 2006 16:27:42 +0000 (16:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@424374 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java

index f5ee333..b244b7f 100644 (file)
@@ -1333,7 +1333,6 @@ public class NioEndpoint {
 
             // 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 @@ public class NioEndpoint {
                         log.error("",x);
                     }
                 }
-
+                //dereference socket to let GC do its job
+                socket = null;
                 // Finish up this request
                 recycleWorkerThread(this);
-
             }
-
         }