Skip to content

Commit 49a13bb

Browse files
committed
Fixed counting error in the Broadcast example.
1 parent 283902e commit 49a13bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/src/main/scala/varys/examples/BroadcastService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private[varys] object BroadcastReceiver extends Logging {
345345

346346
// Create a random order of blocks (Array[(offset, blockSize)])
347347
val allOffsets = new ArrayBuffer[(Int, Int)]
348-
for (fromBytes <- 0L to bInfo.LEN_BYTES by BroadcastUtils.BLOCK_SIZE) {
348+
for (fromBytes <- 0L until bInfo.LEN_BYTES by BroadcastUtils.BLOCK_SIZE) {
349349
val blockSize = if (fromBytes + BroadcastUtils.BLOCK_SIZE >= bInfo.LEN_BYTES) {
350350
bInfo.LEN_BYTES - fromBytes
351351
} else {

0 commit comments

Comments
 (0)