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
|
## This file may not be copied, modified, or distributed except according to
|
||||||
## those terms.
|
## those terms.
|
||||||
|
|
||||||
import unittest, sequtils, options
|
import unittest, sequtils
|
||||||
import chronos
|
import chronos
|
||||||
import utils,
|
import utils,
|
||||||
../../libp2p/[switch,
|
../../libp2p/[switch,
|
||||||
|
|
|
@ -101,6 +101,7 @@ suite "Switch":
|
||||||
|
|
||||||
check isNil(conn)
|
check isNil(conn)
|
||||||
discard allFutures(switch1.stop(), switch2.stop())
|
discard allFutures(switch1.stop(), switch2.stop())
|
||||||
|
await allFutures(awaiters)
|
||||||
result = true
|
result = true
|
||||||
|
|
||||||
check:
|
check:
|
||||||
|
|
Loading…
Reference in New Issue