diff options
author | Greg Wilkins | 2011-11-10 01:11:58 +0000 |
---|---|---|
committer | Greg Wilkins | 2011-11-10 01:11:58 +0000 |
commit | 7a9b8f1e9ddec37e2dc7b98a35bafa20ea999c80 (patch) | |
tree | 9e29c472da0317c46996d5681ea5f629d62b19d1 /jetty-client/src/main/java/org/eclipse/jetty | |
parent | d61258ec4ee707f3eb57ef90e100413d7d438a8f (diff) | |
download | org.eclipse.jetty.project-7a9b8f1e9ddec37e2dc7b98a35bafa20ea999c80.tar.gz org.eclipse.jetty.project-7a9b8f1e9ddec37e2dc7b98a35bafa20ea999c80.tar.xz org.eclipse.jetty.project-7a9b8f1e9ddec37e2dc7b98a35bafa20ea999c80.zip |
reverted last changes due to instability
Diffstat (limited to 'jetty-client/src/main/java/org/eclipse/jetty')
3 files changed, 21 insertions, 11 deletions
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AsyncHttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AsyncHttpConnection.java index 26d8bcc3b9..4474520485 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/AsyncHttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AsyncHttpConnection.java @@ -65,7 +65,7 @@ public class AsyncHttpConnection extends AbstractHttpConnection implements Async // While we are making progress and have not changed connection while (progress && connection==this) { - LOG.debug("while open={} more={} progress={}",_endp.isOpen(),_parser.isMoreInBuffer(),progress); + LOG.debug("while open={} more={} buffering={} progress={}",_endp.isOpen(),_parser.isMoreInBuffer(),_endp.isBufferingInput(),progress); progress=false; HttpExchange exchange=_exchange; @@ -142,14 +142,13 @@ public class AsyncHttpConnection extends AbstractHttpConnection implements Async progress=true; } } - catch (ThreadDeath e) - { - throw e; - } catch (Throwable e) { LOG.debug("Failure on " + _exchange, e); + if (e instanceof ThreadDeath) + throw (ThreadDeath)e; + failed = true; synchronized (this) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/BlockingHttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/BlockingHttpConnection.java index d10d81c7b3..c02e156911 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/BlockingHttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/BlockingHttpConnection.java @@ -59,10 +59,11 @@ public class BlockingHttpConnection extends AbstractHttpConnection { boolean failed = false; + // While we are making progress and have not changed connection while (_endp.isOpen() && connection==this) { - LOG.debug("open={} more={}",_endp.isOpen(),_parser.isMoreInBuffer()); + LOG.debug("open={} more={} buffering={}",_endp.isOpen(),_parser.isMoreInBuffer(),_endp.isBufferingInput()); HttpExchange exchange; synchronized (this) @@ -140,15 +141,15 @@ public class BlockingHttpConnection extends AbstractHttpConnection { LOG.debug("parsed"); } - } - catch (ThreadDeath e) - { - throw e; + } catch (Throwable e) { LOG.debug("Failure on " + _exchange, e); + if (e instanceof ThreadDeath) + throw (ThreadDeath)e; + failed = true; synchronized (this) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java index a896b23f69..3a5eb61d29 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java @@ -273,7 +273,7 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector ((SelectChannelEndPoint)_endp).setConnection(sslConnection); _endp=sslConnection.getSslEndPoint(); - sslConnection.getSslEndPoint().setConnection(connection); + sslConnection.setConnection(connection); LOG.debug("upgrade {} to {} for {}",this,sslConnection,connection); } @@ -404,6 +404,11 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector return _endp.isBlocking(); } + public boolean isBufferred() + { + return _endp.isBufferred(); + } + public boolean blockReadable(long millisecs) throws IOException { return _endp.blockReadable(millisecs); @@ -424,6 +429,11 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector return _endp.getTransport(); } + public boolean isBufferingInput() + { + return _endp.isBufferingInput(); + } + public boolean isBufferingOutput() { return _endp.isBufferingOutput(); |