remove unnecesary while

This commit is contained in:
Dmitriy Ryajov 2020-03-11 09:32:10 -06:00
parent 4fc84cbe81
commit 59abd2e4cd
1 changed files with 1 additions and 4 deletions

View File

@ -428,10 +428,7 @@ suite "Mplex":
const max = 500
const min = 100
while sent < total:
var len = 0
while len > max or len <= 0:
len = rand(min..max)
var len = rand(min..max)
len = if len > buf.buffer.len: buf.buffer.len else: len
var send = buf.buffer[0..<len-1]
await conn.write(send)