diff --git a/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy b/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy index ec6bb3f6..0697548d 100644 --- a/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy +++ b/core/src/main/groovy/com/muwire/core/download/DownloadSession.groovy @@ -195,7 +195,8 @@ class DownloadSession { return reads[idx] long interval = timestamps.last - timestamps[idx] - + if (interval == 0) + interval = 0.001 for (int i = idx; i < SAMPLES; i++) totalRead += reads[idx] (int)(totalRead * 1000.0 / interval)