mirror of https://github.com/vacp2p/nim-libp2p.git
await connection
This commit is contained in:
parent
946b9580c0
commit
85d4baca95
|
@ -241,7 +241,7 @@ proc internalConnect(s: Switch,
|
|||
result = conn
|
||||
|
||||
proc connect*(s: Switch, peer: PeerInfo) {.async.} =
|
||||
var conn = s.internalConnect(peer)
|
||||
var conn = await s.internalConnect(peer)
|
||||
if isNil(conn):
|
||||
raise newException(CatchableError, "Unable to connect to peer")
|
||||
|
||||
|
|
Loading…
Reference in New Issue