Skip to content

Commit

Permalink
[client] Init route selector early (#2989)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal authored Dec 5, 2024
1 parent c853011 commit 6cfbb1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/internal/routemanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ func NewManager(

// Init sets up the routing
func (m *DefaultManager) Init() (nbnet.AddHookFunc, nbnet.RemoveHookFunc, error) {
m.routeSelector = m.initSelector()

if nbnet.CustomRoutingDisabled() {
return nil, nil, nil
}
Expand All @@ -144,8 +146,6 @@ func (m *DefaultManager) Init() (nbnet.AddHookFunc, nbnet.RemoveHookFunc, error)
return nil, nil, fmt.Errorf("setup routing: %w", err)
}

m.routeSelector = m.initSelector()

log.Info("Routing setup complete")
return beforePeerHook, afterPeerHook, nil
}
Expand Down

0 comments on commit 6cfbb1f

Please sign in to comment.