From 78a792dfbf093ec6e2c34fa36dcb6f0e16d182a9 Mon Sep 17 00:00:00 2001 From: fhanik Date: Fri, 16 Mar 2007 22:38:19 +0000 Subject: [PATCH] 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 --- java/org/apache/tomcat/util/net/NioEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.11.0