Skip to content

Commit

Permalink
swarm metrics: fix connection direction (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt authored and marten-seemann committed Feb 27, 2023
1 parent 2448c86 commit fdb16c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (s *Swarm) AddListenAddr(a ma.Multiaddr) error {
}
canonicallog.LogPeerStatus(100, c.RemotePeer(), c.RemoteMultiaddr(), "connection_status", "established", "dir", "inbound")
if s.metricsTracer != nil {
c = wrapWithMetrics(c, s.metricsTracer, time.Now(), network.DirOutbound)
c = wrapWithMetrics(c, s.metricsTracer, time.Now(), network.DirInbound)
}

log.Debugf("swarm listener accepted connection: %s <-> %s", c.LocalMultiaddr(), c.RemoteMultiaddr())
Expand Down

0 comments on commit fdb16c9

Please sign in to comment.