From 663fe81af2a3ec9d226aa673bd527b2d8a41b284 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 5 Jun 2009 07:01:13 +0000 Subject: [PATCH] Made sure interestOps is updated before OIO thread is interrupted --- .../java/org/jboss/netty/channel/socket/oio/OioWorker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioWorker.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioWorker.java index 583b73e963..4766b9c3ec 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioWorker.java @@ -159,6 +159,8 @@ class OioWorker implements Runnable { future.setSuccess(); if (changed) { + channel.setInterestOpsNow(interestOps); + // Notify the worker so it stops or continues reading. Thread currentThread = Thread.currentThread(); Thread workerThread = channel.workerThread; @@ -166,7 +168,6 @@ class OioWorker implements Runnable { workerThread.interrupt(); } - channel.setInterestOpsNow(interestOps); fireChannelInterestChanged(channel); } } catch (Throwable t) {