diff --git a/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/MapTileDownloader.java b/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/MapTileDownloader.java
index <HASH>..<HASH> 100644
--- a/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/MapTileDownloader.java
+++ b/osmdroid-android/src/main/java/org/osmdroid/tileprovider/modules/MapTileDownloader.java
@@ -214,6 +214,7 @@ public class MapTileDownloader extends MapTileModuleProviderBase {
 						Log.d(IMapView.LOGTAG, tileURLString);
 					}
 					Counters.tileDownloadErrors++;
+					in = c.getErrorStream(); // in order to have the error stream purged by the finally block
 					return null;
 				}
 				if (Configuration.getInstance().isDebugMapTileDownloader()) {
Download fix when an error occurs

Suggested and