Skip to content

Commit

Permalink
renamed StreamDisconnect to OnDisconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed May 12, 2021
1 parent 1b0922d commit c22b4bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/net/message_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewMessageSenderImpl(h host.Host, protos []protocol.ID) pb.MessageSender {
}
}

func (m *messageSenderImpl) StreamDisconnect(ctx context.Context, p peer.ID) {
func (m *messageSenderImpl) OnDisconnect(ctx context.Context, p peer.ID) {
m.smlk.Lock()
defer m.smlk.Unlock()
ms, ok := m.strmap[p]
Expand Down
4 changes: 2 additions & 2 deletions subscriber_notifee.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (dht *IpfsDHT) validRTPeer(p peer.ID) (bool, error) {
}

type disconnector interface {
StreamDisconnect(ctx context.Context, p peer.ID)
OnDisconnect(ctx context.Context, p peer.ID)
}

func (nn *subscriberNotifee) Disconnected(n network.Network, v network.Conn) {
Expand All @@ -179,7 +179,7 @@ func (nn *subscriberNotifee) Disconnected(n network.Network, v network.Conn) {
}

if ms, ok := dht.msgSender.(disconnector); ok {
ms.StreamDisconnect(dht.Context(), p)
ms.OnDisconnect(dht.Context(), p)
}
}

Expand Down

0 comments on commit c22b4bf

Please sign in to comment.