Adds retry handler for http requests, to retry connections if they have expired while waiting for user input.

cusax-fix
Damian Minkov 13 years ago
parent eef675dce7
commit ce64d716b7

@ -581,6 +581,13 @@ public static DefaultHttpClient getHttpClient(
usernamePropertyName, passwordPropertyName);
httpClient.setCredentialsProvider(credentialsProvider);
// enable retry connecting with default retry handler
// when connecting has prompted for authentication
// connection can be disconnected nefore user answers and
// we need to retry connection, using the credentials provided
httpClient.setHttpRequestRetryHandler(
new DefaultHttpRequestRetryHandler(3, true));
return httpClient;
}

Loading…
Cancel
Save