From ff75d9e38adf18cefaea429f7305cb5f7bf7f9b4 Mon Sep 17 00:00:00 2001 From: Thomas Becker Date: Tue, 6 Mar 2012 21:26:46 +0100 Subject: [PATCH] 373394: fix for IllegalArgumentException in SelectChannelEndpoint.blockWritable() when wait is called with a negative value. --- .../org/eclipse/jetty/io/nio/SelectChannelEndPoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java index b7b2108d406..b24ebd8d0d9 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @@ -385,7 +385,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo try { updateKey(); - this.wait(timeoutMs>=0?(end-now):10000); + this.wait(timeoutMs>0?(end-now):10000); } catch (InterruptedException e) { @@ -433,7 +433,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo try { updateKey(); - this.wait(timeoutMs>=0?(end-now):10000); + this.wait(timeoutMs>0?(end-now):10000); } catch (InterruptedException e) { @@ -462,7 +462,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo */ public void scheduleWrite() { - if (_writable==true) + if (_writable) LOG.debug("Required scheduleWrite {}",this); _writable=false;