From 5d022a627b3379544dda6e7b21661c45cb84d66c Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 5 Oct 2009 13:16:24 +0000 Subject: [PATCH] Fixed bug #291340: Race condition in onException() notifications. git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@966 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 1 + .../main/java/org/eclipse/jetty/client/HttpConnection.java | 2 +- .../main/java/org/eclipse/jetty/client/HttpDestination.java | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index bda87fbd77a..dc551440594 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -9,6 +9,7 @@ jetty-7.0.1-SNAPSHOT + 289960 start.jar assumes command line args are configs + JETTY-1114 unsynchronised WebAppClassloader.getResource(String) + Fixed XSS issue in CookieDump demo servlet. + + 291340 Race condition in onException() notifications jetty-7.0.0 + 289958 StatisticsServlet incorrectly adds StatisticsHandler diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java index a337054d260..9c751ec3242 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java @@ -262,8 +262,8 @@ public class HttpConnection implements Connection // but we don't report it as it is normal cancelling operation if (_exchange.getStatus() != HttpExchange.STATUS_CANCELLING) { - _exchange.getEventListener().onException(e); _exchange.setStatus(HttpExchange.STATUS_EXCEPTED); + _exchange.getEventListener().onException(e); } } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java index eebb0aafdb4..163dc739dc3 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java @@ -253,8 +253,8 @@ public class HttpDestination else if (_queue.size() > 0) { HttpExchange ex = _queue.removeFirst(); - ex.getEventListener().onConnectionFailed(throwable); ex.setStatus(HttpExchange.STATUS_EXCEPTED); + ex.getEventListener().onConnectionFailed(throwable); } } @@ -279,8 +279,8 @@ public class HttpDestination if (_queue.size() > 0) { HttpExchange ex = _queue.removeFirst(); - ex.getEventListener().onException(throwable); ex.setStatus(HttpExchange.STATUS_EXCEPTED); + ex.getEventListener().onException(throwable); } } }