diff --git a/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy b/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy index 440a2fa0..2a104fdb 100644 --- a/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy +++ b/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy @@ -160,7 +160,7 @@ class BrowseSession implements Runnable { if (j == batch.length) { eventBus.publish(new UIResultBatchEvent(results: batch, uuid: uuid)) j = 0 - batch = new UIResultEvent[Math.min(results - i - 1, BATCH_SIZE)] + batch = new UIResultEvent[Math.min(files - i - 1, BATCH_SIZE)] log.fine("publishing batch, next batch size ${batch.length}") } }