Author: markt Date: Thu May 2 21:42:08 2013 New Revision: 1478578 URL: http://svn.apache.org/r1478578 Log: More refactoring
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1478578&r1=1478577&r2=1478578&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Thu May 2 21:42:08 2013 @@ -221,12 +221,7 @@ public class Http11NioProcessor extends public SocketState process(SocketWrapper<NioChannel> socketWrapper) throws IOException { SocketState state = super.process(socketWrapper); - final NioEndpoint.KeyAttachment attach = - (NioEndpoint.KeyAttachment)socket.getSocket().getAttachment( - false); - if (attach != null) { - registerForWrite(); - } + registerForWrite(); return state; } @@ -244,8 +239,11 @@ public class Http11NioProcessor extends protected void registerForEvent(int event) { final NioEndpoint.KeyAttachment attach = - (NioEndpoint.KeyAttachment)socket.getSocket().getAttachment(false); - attach.interestOps(attach.interestOps() | event); + (NioEndpoint.KeyAttachment)socket.getSocket().getAttachment( + false); + if (attach != null) { + attach.interestOps(attach.interestOps() | event); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org