No destructors on future so gotta cancel those manually

This commit is contained in:
Giovanni Petrantoni 2020-02-07 15:56:18 +09:00 committed by Dmitriy Ryajov
parent 6c0839db01
commit 0d0a6e9cfb
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,7 @@ suite "Mplex":
await stream.writeLp("Hello from stream!") await stream.writeLp("Hello from stream!")
await lock or timeout await lock or timeout
check lock.finished check lock.finished
timeout.cancel()
await conn.close() await conn.close()
check not openState # assert lazy check not openState # assert lazy
result = true result = true
@ -217,6 +218,7 @@ suite "Mplex":
await stream.writeLp(bigseq) await stream.writeLp(bigseq)
await lock or timeout await lock or timeout
check timeout.finished # this test has to timeout! check timeout.finished # this test has to timeout!
lock.cancel();
await conn.close() await conn.close()
result = true result = true