Skip to content

Commit

Permalink
Check file generation time
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewschenko committed Jun 28, 2023
1 parent 87d87c4 commit f136362
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions OsmAnd/src/net/osmand/plus/utils/AndroidNetworkUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,7 @@ public static long downloadModifiedFile(
} else {
long lastModified = connection.getLastModified();
if (lastModified > 0 && lastModified <= lastTime) {
long currentTime = System.currentTimeMillis();
if (currentTime - lastModified > net.osmand.plus.plugins.weather.WeatherHelper.WEATHER_FORECAST_EXPIRE_TIME) {
return 0;
}
return 0;
}
InputStream inputStream = gzip
? new GZIPInputStream(connection.getInputStream())
Expand Down

0 comments on commit f136362

Please sign in to comment.