Author: markt
Date: Wed Dec 5 11:38:44 2012
New Revision: 1417366
URL: http://svn.apache.org/viewvc?rev=1417366&view=rev
Log:
Avoid NPE
Log error sooner
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1417201,1417365
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1417366&r1=1417365&r2=1417366&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed
Dec 5 11:38:44 2012
@@ -1697,9 +1697,11 @@ public class NioEndpoint extends Abstrac
} catch (OutOfMemoryError oom) {
try {
oomParachuteData = null;
-
socket.getPoller().cancelledKey(key,SocketStatus.ERROR,false);
- releaseCaches();
log.error("", oom);
+ if (socket != null) {
+
socket.getPoller().cancelledKey(key,SocketStatus.ERROR, false);
+ }
+ releaseCaches();
}catch ( Throwable oomt ) {
try {
System.err.println(oomParachuteMsg);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]