From 1729fb045c63e24f9a60ede7c042f29319d54e8a Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 15 Oct 2014 18:16:03 +1100 Subject: [PATCH] 446923 SharedBlockingCallback does not handle connector max idle time of Long.MAX_VALUE; BlockerTimeoutException not serializable --- .../java/org/eclipse/jetty/util/SharedBlockingCallback.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java index 1c4ff3404d1..2e8bfb87cd5 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java @@ -102,7 +102,7 @@ public class SharedBlockingCallback { while (_blocker._state != IDLE) { - if (idle>0) + if (idle>0 && (idle < Long.MAX_VALUE/2)) { // Wait a little bit longer than the blocker might block if (!_idle.await(idle*2,TimeUnit.MILLISECONDS)) @@ -207,7 +207,7 @@ public class SharedBlockingCallback { while (_state == null) { - if (idle>0) + if (idle>0 && (idle < Long.MAX_VALUE/2)) { // Wait a little bit longer than expected callback idle timeout if (!_complete.await(idle+idle/2,TimeUnit.MILLISECONDS)) @@ -296,7 +296,7 @@ public class SharedBlockingCallback } } - private class BlockerTimeoutException extends TimeoutException + private static class BlockerTimeoutException extends TimeoutException { } }