Ignore:
Timestamp:
2015-08-05T23:51:30+02:00 (9 years ago)
Author:
wiktorn
Message:

Fix behaviour when exception is thrown during download.

  • fix endless download, when exception is thrown during download
  • draw multiline error text on tile if error string is longer than tile width
File:
1 edited

Legend:

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

    r8640 r8643  
    276276                return false;
    277277            }
    278         } else {
     278        } else if (attributes.getLastModification() > 0 &&
     279                now - attributes.getLastModification() > DEFAULT_EXPIRE_TIME) {
    279280            // check by file modification date
    280             if (now - attributes.getLastModification() > DEFAULT_EXPIRE_TIME) {
    281                 log.log(Level.FINE, "JCS - Object has expired, maximum file age reached {0}", getUrl());
    282                 return false;
    283             }
     281            log.log(Level.FINE, "JCS - Object has expired, maximum file age reached {0}", getUrl());
     282            return false;
     283        } else if (now - attributes.getCreateTime() > DEFAULT_EXPIRE_TIME) {
     284            log.log(Level.FINE, "JCS - Object has expired, maximum time since object creation reached {0}", getUrl());
     285            return false;
    284286        }
    285287        return true;
Note: See TracChangeset for help on using the changeset viewer.