Skip to content

Commit

Permalink
Fixed RLDP Overlay disconnect loop overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xssnick committed Apr 12, 2024
1 parent 85a8f0d commit 14e651e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions adnl/overlay/manager-rldp.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ func CreateExtendedRLDP(rldp RLDP) *RLDPWrapper {
overlays: map[string]*RLDPOverlayWrapper{},
}
w.RLDP.SetOnQuery(w.queryHandler)
prev := w.GetADNL().GetDisconnectHandler()
w.GetADNL().SetDisconnectHandler(func(addr string, key ed25519.PublicKey) {
if prev != nil {
prev(addr, key)
}
w.disconnectHandler(addr, key)
})
w.GetADNL().SetDisconnectHandler(w.disconnectHandler)

return w
}
Expand Down

0 comments on commit 14e651e

Please sign in to comment.