From 080a5008ada09c1ecd0cd259bd94f51e280e7711 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Thu, 30 Jul 2015 17:51:55 +0200 Subject: Fix connection error detection --- .../src/main/java/org/sonar/runner/impl/ServerConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sonar-runner-api/src/main/java/org') 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); } -- cgit v1.2.3