tests fixing
This commit is contained in:
parent
543ebdbdf5
commit
ef410509e6
|
@ -159,17 +159,22 @@ proc addHandler*[T: LPProtocol](m: MultistreamSelect,
|
|||
codecs: seq[string],
|
||||
protocol: T,
|
||||
matcher: Matcher = nil) =
|
||||
trace "registering protocol", protos = codecs
|
||||
# trace "registering protocol", protos = codecs
|
||||
m.handlers.add(HandlerHolder(protos: codecs,
|
||||
protocol: protocol,
|
||||
match: matcher))
|
||||
|
||||
proc addHandler*[T: LPProtocol](m: MultistreamSelect,
|
||||
codec: string,
|
||||
protocol: T,
|
||||
matcher: Matcher = nil) =
|
||||
addHandler(m, @[codec], protocol, matcher)
|
||||
|
||||
proc addHandler*[T: LPProtoHandler](m: MultistreamSelect,
|
||||
codec: string,
|
||||
handler: T,
|
||||
matcher: Matcher = nil) =
|
||||
## helper to allow registering pure handlers
|
||||
|
||||
trace "registering proto handler", proto = codec
|
||||
let protocol = new LPProtocol
|
||||
protocol.codec = codec
|
||||
|
|
|
@ -580,7 +580,7 @@ proc maintainPeers(s: Switch) {.async.} =
|
|||
var conns = s.connections.getOrDefault(peer.id)
|
||||
if conns.len == 0:
|
||||
# attempt re-connect in this case
|
||||
trace "explicit peering, trying to re-connect", peer
|
||||
trace "explicit peering, trying to re-connect", peer = peer.id
|
||||
await s.connect(peer)
|
||||
|
||||
s.maintainSleepFut = sleepAsync(5.minutes) # spec recommended
|
||||
|
|
Loading…
Reference in New Issue