don't forget to await for switch to close

This commit is contained in:
Dmitriy Ryajov 2020-02-12 18:17:20 -05:00
parent c701752d87
commit f6c4d2130a
2 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,7 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
import unittest, sequtils, options
import unittest, sequtils
import chronos
import utils,
../../libp2p/[switch,

View File

@ -101,6 +101,7 @@ suite "Switch":
check isNil(conn)
discard allFutures(switch1.stop(), switch2.stop())
await allFutures(awaiters)
result = true
check: