aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-runner-api/src/main/java/org
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-07-30 17:51:55 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-07-30 17:51:55 +0200
commit080a5008ada09c1ecd0cd259bd94f51e280e7711 (patch)
tree4fd1b5ce1dc7835f4a4ce2d84213738dc93e800e /sonar-runner-api/src/main/java/org
parent6ae87caef4147e53cb58866c99ce978edd4d3b9c (diff)
downloadsonar-scanner-cli-080a5008ada09c1ecd0cd259bd94f51e280e7711.tar.gz
sonar-scanner-cli-080a5008ada09c1ecd0cd259bd94f51e280e7711.zip
Fix connection error detection
Diffstat (limited to 'sonar-runner-api/src/main/java/org')
-rw-r--r--sonar-runner-api/src/main/java/org/sonar/runner/impl/ServerConnection.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-runner-api/src/main/java/org/sonar/runner/impl/ServerConnection.java b/sonar-runner-api/src/main/java/org/sonar/runner/impl/ServerConnection.java
index da9a86c..45a7606 100644
--- a/sonar-runner-api/src/main/java/org/sonar/runner/impl/ServerConnection.java
+++ b/sonar-runner-api/src/main/java/org/sonar/runner/impl/ServerConnection.java
@@ -139,7 +139,8 @@ class ServerConnection {
try {
return downloadString(fullUrl, isCacheEnable);
} catch (HttpRequest.HttpRequestException e) {
- if (e.getCause() instanceof ConnectException || e.getCause() instanceof UnknownHostException) {
+ if (e.getCause() instanceof ConnectException || e.getCause() instanceof UnknownHostException ||
+ e.getCause() instanceof java.net.SocketTimeoutException) {
if (isCacheEnable) {
return fallbackToCache(fullUrl, e);
}