Changed connection state now correctly propagates to messenger (#3310)

This commit is contained in:
Volodymyr Kozieiev 2023-03-20 11:52:24 +00:00 committed by GitHub
parent fe4e079bea
commit 94cd1ecebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -615,11 +615,13 @@ func (n *StatusNode) PeerCount() int {
}
func (n *StatusNode) ConnectionChanged(state connection.State) {
if n.wakuExtSrvc == nil {
return
if n.wakuExtSrvc != nil {
n.wakuExtSrvc.ConnectionChanged(state)
}
n.wakuExtSrvc.ConnectionChanged(state)
if n.wakuV2ExtSrvc != nil {
n.wakuV2ExtSrvc.ConnectionChanged(state)
}
}
// AccountManager exposes reference to node's accounts manager