Author: markt
Date: Fri Apr 26 13:04:06 2013
New Revision: 1476177
URL: http://svn.apache.org/r1476177
Log:
Another NPE in the WebSocket tests.
Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1476177&r1=1476176&r2=1476177&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Fri
Apr 26 13:04:06 2013
@@ -789,6 +789,10 @@ public class InternalNioInputBuffer exte
AbstractEndpoint endpoint) throws IOException {
socket = socketWrapper.getSocket();
+ if (socket == null) {
+ // Socket has been closed in another thread
+ throw new IOException(sm.getString("iib.socketClosed"));
+ }
socketReadBufferSize =
socket.getBufHandler().getReadBuffer().capacity();
Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1476177&r1=1476176&r2=1476177&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Fri Apr
26 13:04:06 2013
@@ -30,5 +30,6 @@ iib.invalidheader=The HTTP header line [
iib.invalidmethod=Invalid character (CR or LF) found in method name
iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer
not recycled?
iib.requestheadertoolarge.error=Request header is too large
+iib.socketClosed=The socket has been closed in another thread
iob.responseheadertoolarge.error=An attempt was made to write more data to the
response headers than there was room available in the buffer. Increase
maxHttpHeaderSize on the connector or write less data into the response headers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]