summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2011-01-30 17:30:02 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-30 17:30:02 -0800
commite59c288fca5a99d07f09494e8d03a228a347c3f8 (patch)
tree325485cf535e2846b4ccfde030de4a9e98a8751d
parentd5b79c970e9c5cb22603663d8fcb0c5e49dd4371 (diff)
parentb91c5e936342afbdd58c88ac604d5dd505d0fe0c (diff)
downloadexternal_apache-http-e59c288fca5a99d07f09494e8d03a228a347c3f8.zip
external_apache-http-e59c288fca5a99d07f09494e8d03a228a347c3f8.tar.gz
external_apache-http-e59c288fca5a99d07f09494e8d03a228a347c3f8.tar.bz2
am b91c5e93: DefaultRequestDirector should ignore IOExceptions from stale connections
* commit 'b91c5e936342afbdd58c88ac604d5dd505d0fe0c': DefaultRequestDirector should ignore IOExceptions from stale connections
-rw-r--r--src/org/apache/http/impl/client/DefaultRequestDirector.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/org/apache/http/impl/client/DefaultRequestDirector.java b/src/org/apache/http/impl/client/DefaultRequestDirector.java
index 511f8a0..a95c522 100644
--- a/src/org/apache/http/impl/client/DefaultRequestDirector.java
+++ b/src/org/apache/http/impl/client/DefaultRequestDirector.java
@@ -334,7 +334,18 @@ public class DefaultRequestDirector implements RequestDirector {
this.log.debug("Stale connection check");
if (managedConn.isStale()) {
this.log.debug("Stale connection detected");
- managedConn.close();
+ // BEGIN android-changed
+ try {
+ managedConn.close();
+ } catch (IOException ignored) {
+ // SSLSocket's will throw IOException
+ // because they can't send a "close
+ // notify" protocol message to the
+ // server. Just supresss any
+ // exceptions related to closing the
+ // stale connection.
+ }
+ // END android-changed
}
}
}