use the proto we already have in AddPeer to determine whether the connection houses the stream
This commit is contained in:
parent
4207beae0d
commit
31c9b219f4
@ -361,12 +361,7 @@ loop:
|
|||||||
if c.Stat().Direction == network.DirOutbound {
|
if c.Stat().Direction == network.DirOutbound {
|
||||||
// only count the connection if it has a pubsub stream
|
// only count the connection if it has a pubsub stream
|
||||||
for _, s := range c.GetStreams() {
|
for _, s := range c.GetStreams() {
|
||||||
switch s.Protocol() {
|
if s.Protocol() == proto {
|
||||||
case FloodSubID:
|
|
||||||
fallthrough
|
|
||||||
case GossipSubID_v10:
|
|
||||||
fallthrough
|
|
||||||
case GossipSubID_v11:
|
|
||||||
outbound = true
|
outbound = true
|
||||||
break loop
|
break loop
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user