mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-14 00:46:44 +00:00
fix(libp2p): Updating nim-libp2p to fix the wss
connectivity issue (#1848)
* Updating nim-libp2p to fix the `wss` connectivity issue * The `nim-libp2p` adds many changes although we are actually interested in the latest commit: > wstransport.nim: avoid re-raising 'TransportOsError' to avoid stopping `switch.accept` (#929) * The `nim-stew` bump is needed so that the `nim-libp2p` can compile. * The changes in `waku_node.nim` are needed due to the changes in `nim-stew`. * waku_node.nim: returning a "completed" future within 'statusAndConfidenceHandler' This is aimed to avoid the next exception happening in the wakunode: ``` Unhandled defect: Async procedure (service.nim(74) callHandler) yielded `nil`, are you await'ing a `nil` Future? [AssertionDefect] ``` * Adding 'async' to 'statusAndConfidenceHandler' so that it properly returns a Future[void]
This commit is contained in:
parent
3fe4522a7e
commit
1d3410c7bd
2
vendor/nim-libp2p
vendored
2
vendor/nim-libp2p
vendored
@ -1 +1 @@
|
||||
Subproject commit 224f92e17251464984d6906316c54d2e1108ae43
|
||||
Subproject commit 74c402ed9db4652a455c00c8d1713b222e3ef3d5
|
2
vendor/nim-stew
vendored
2
vendor/nim-stew
vendored
@ -1 +1 @@
|
||||
Subproject commit e18f5a62af2ade7a1fd1d39635d4e04d944def08
|
||||
Subproject commit 6c97f11c7cb59eadf91b124b92d2ec035f7251fa
|
@ -113,13 +113,15 @@ proc getAutonatService*(rng: ref HmacDrbgContext): AutonatService =
|
||||
let autonatService = AutonatService.new(
|
||||
autonatClient = AutonatClient.new(),
|
||||
rng = rng,
|
||||
scheduleInterval = some(chronos.seconds(120)),
|
||||
scheduleInterval = Opt.some(chronos.seconds(120)),
|
||||
askNewConnectedPeers = false,
|
||||
numPeersToAsk = 3,
|
||||
maxQueueSize = 3,
|
||||
minConfidence = 0.7)
|
||||
|
||||
proc statusAndConfidenceHandler(networkReachability: NetworkReachability, confidence: Option[float]) {.gcsafe, async.} =
|
||||
proc statusAndConfidenceHandler(networkReachability: NetworkReachability,
|
||||
confidence: Opt[float]):
|
||||
Future[void] {.gcsafe, async.} =
|
||||
if confidence.isSome():
|
||||
info "Peer reachability status", networkReachability=networkReachability, confidence=confidence.get()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user