remove unnecesary while
This commit is contained in:
parent
4fc84cbe81
commit
59abd2e4cd
|
@ -428,10 +428,7 @@ suite "Mplex":
|
||||||
const max = 500
|
const max = 500
|
||||||
const min = 100
|
const min = 100
|
||||||
while sent < total:
|
while sent < total:
|
||||||
var len = 0
|
var len = rand(min..max)
|
||||||
while len > max or len <= 0:
|
|
||||||
len = rand(min..max)
|
|
||||||
|
|
||||||
len = if len > buf.buffer.len: buf.buffer.len else: len
|
len = if len > buf.buffer.len: buf.buffer.len else: len
|
||||||
var send = buf.buffer[0..<len-1]
|
var send = buf.buffer[0..<len-1]
|
||||||
await conn.write(send)
|
await conn.write(send)
|
||||||
|
|
Loading…
Reference in New Issue