Ignore:
Timestamp:
2018-09-22T12:38:49+02:00 (6 years ago)
Author:
wiktorn
Message:

Treat SocketTimeoutException as transient error.

Extend CacheEntryAttributes and allow storage of exception class name. Use this
information to treat SocketTimeoutException in TMS downloads as transient.

See: #16743

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r13825 r14270  
    392392            attributes.setResponseCode(404);
    393393            attributes.setError(e);
     394            attributes.setException(e);
    394395            boolean doCache = isResponseLoadable(null, 404, null) || cacheAsEmpty();
    395396            if (doCache) {
     
    404405            } else {
    405406                attributes.setError(e);
     407                attributes.setException(e);
    406408                attributes.setResponseCode(599); // set dummy error code, greater than 500 so it will be not cached
    407409                return false;
     
    410412        } catch (InterruptedException e) {
    411413            attributes.setError(e);
     414            attributes.setException(e);
    412415            Logging.logWithStackTrace(Logging.LEVEL_WARN, e, "JCS - Exception during download {0}", getUrlNoException());
    413416            Thread.currentThread().interrupt();
Note: See TracChangeset for help on using the changeset viewer.