Commit a601e86f authored by Yusef Napora's avatar Yusef Napora

subscribe connmgr to net notifications

parent a35db1d1
...@@ -63,6 +63,9 @@ func NewBlankHost(n network.Network, options ...Option) *BlankHost { ...@@ -63,6 +63,9 @@ func NewBlankHost(n network.Network, options ...Option) *BlankHost {
eventbus: eventbus.NewBus(), eventbus: eventbus.NewBus(),
} }
// subscribe the connection manager to network notifications (has no effect with NullConnMgr)
n.Notify(bh.cmgr.Notifee())
var err error var err error
if bh.emitters.evtLocalProtocolsUpdated, err = bh.eventbus.Emitter(&event.EvtLocalProtocolsUpdated{}); err != nil { if bh.emitters.evtLocalProtocolsUpdated, err = bh.eventbus.Emitter(&event.EvtLocalProtocolsUpdated{}); err != nil {
return nil return nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment