don't forget to await for switch to close
This commit is contained in:
parent
c701752d87
commit
f6c4d2130a
|
@ -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,
|
||||
|
|
|
@ -101,6 +101,7 @@ suite "Switch":
|
|||
|
||||
check isNil(conn)
|
||||
discard allFutures(switch1.stop(), switch2.stop())
|
||||
await allFutures(awaiters)
|
||||
result = true
|
||||
|
||||
check:
|
||||
|
|
Loading…
Reference in New Issue