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