mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-17 00:11:24 +00:00
Support more generic Socket Exceptions
For instance: connection reset by peer
This commit is contained in:
@@ -904,8 +904,7 @@ class Requester {
|
||||
// don't wrap exception in HttpException to preserve backward compatibility
|
||||
throw e;
|
||||
} catch (IOException e) {
|
||||
if (((e instanceof SocketException && e.getCause() instanceof SocketTimeoutException)
|
||||
|| e instanceof SocketTimeoutException) && timeouts > 0) {
|
||||
if ((e instanceof SocketException || e instanceof SocketTimeoutException) && timeouts > 0) {
|
||||
LOGGER.log(INFO,
|
||||
"timed out accessing " + uc.getURL() + ". Sleeping 5 seconds before retrying... ; will try"
|
||||
+ timeouts + " more time(s)",
|
||||
|
||||
Reference in New Issue
Block a user