File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
geowebcache/azureblob/src/main/java/org/geowebcache/azure Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -209,14 +209,18 @@ public boolean delete(TileRange tileRange) throws StorageException {
209209 /** Splits the deletion in parts to avoid memory accumulation. */
210210 private Stream <List <BlobItem >> findTileBlobsToDelete (TileRange tileRange , String coordsPrefix ) {
211211
212- Iterable <List <BlobItem >> iterable = () -> new Iterator <>() {
212+ Iterable <List <BlobItem >> blobsIterable = () -> new Iterator <>() {
213213 private final int zoomStart = tileRange .getZoomStart ();
214214 private final int zoomStop = tileRange .getZoomStop ();
215215 private int currentZoom = zoomStart ;
216216 private Iterator <BlobItem > currentBlobIterator = Collections .emptyIterator ();
217217
218218 @ Override
219219 public boolean hasNext () {
220+ if (shutDown ) {
221+ return false ;
222+ }
223+
220224 while (!currentBlobIterator .hasNext () && currentZoom <= zoomStop ) {
221225 String zoomPrefix = coordsPrefix + "/" + currentZoom ;
222226
@@ -253,7 +257,7 @@ public List<BlobItem> next() {
253257 }
254258 };
255259
256- return StreamSupport .stream (iterable .spliterator (), false );
260+ return StreamSupport .stream (blobsIterable .spliterator (), false );
257261 }
258262
259263 private boolean isTileBlobInBounds (BlobItem tileBlob , long [] bounds ) {
You can’t perform that action at this time.
0 commit comments