Skip to content

Commit

Permalink
Merge pull request #45 from libp2p/fix/connmgr-notifee
Browse files Browse the repository at this point in the history
subscribe connmgr to net notifications
  • Loading branch information
vyzo authored May 11, 2020
2 parents 693d670 + f124798 commit 0d68774
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions p2p/host/blank/blank.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func NewBlankHost(n network.Network, options ...Option) *BlankHost {
eventbus: eventbus.NewBus(),
}

// subscribe the connection manager to network notifications (has no effect with NullConnMgr)
n.Notify(bh.cmgr.Notifee())

var err error
if bh.emitters.evtLocalProtocolsUpdated, err = bh.eventbus.Emitter(&event.EvtLocalProtocolsUpdated{}); err != nil {
return nil
Expand Down

0 comments on commit 0d68774

Please sign in to comment.