mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-05 23:43:07 +00:00
fix: avoid sending relay callbacks if relay is disabled (#3276)
This commit is contained in:
parent
3d8f4364f4
commit
a117143ca1
@ -67,6 +67,11 @@ proc createWaku(
|
|||||||
formattedString & ". expected type: " & $typeof(confValue)
|
formattedString & ". expected type: " & $typeof(confValue)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Don't send relay app callbacks if relay is disabled
|
||||||
|
if not conf.relay and not appCallbacks.isNil():
|
||||||
|
appCallbacks.relayHandler = nil
|
||||||
|
appCallbacks.topicHealthChangeHandler = nil
|
||||||
|
|
||||||
let wakuRes = Waku.new(conf, appCallbacks).valueOr:
|
let wakuRes = Waku.new(conf, appCallbacks).valueOr:
|
||||||
error "waku initialization failed", error = error
|
error "waku initialization failed", error = error
|
||||||
return err("Failed setting up Waku: " & $error)
|
return err("Failed setting up Waku: " & $error)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user