> } else {
> - byte[] content = closeClientButKeepContentStream(response);
> - //TODO: what is the error when the session token expires??
> - if (content != null && new String(content).contains("lease
> renew")) {
> - logger.debug("invalidating authentication token");
> - authenticationResponseCache.invalidateAll();
> - retry = true;
> + closeClientButKeepContentStream(response);
> + // At this point, this is not an authentication request
> returning 401
> + // Check if we already had seen this request
> + Integer count = retryCountMap.getIfPresent(command);
> + if(count!=null) {
> + // This request has failed before
> + if(count.intValue() >= 4 ) {
> + logger.debug("too many 401s - giving up after: " +
> count.intValue());
Also log the request?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/104/files#r5645416