From: fhanik Date: Fri, 16 Mar 2007 22:38:19 +0000 (+0000) Subject: fixed minor bug introduced recently X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=78a792dfbf093ec6e2c34fa36dcb6f0e16d182a9;p=tomcat7.0 fixed minor bug introduced recently git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@519168 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 48476ae1b..7d7182927 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1145,11 +1145,11 @@ public class NioEndpoint { } } else { final SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); - final KeyAttachment att = (KeyAttachment) key.attachment(); - //we are registering the key to start with, reset the fairness counter. - att.setFairness(0); try { if (key != null) { + final KeyAttachment att = (KeyAttachment) key.attachment(); + //we are registering the key to start with, reset the fairness counter. + att.setFairness(0); key.interestOps(interestOps); att.interestOps(interestOps); }