Commit 31c9b219 authored by vyzo's avatar vyzo

use the proto we already have in AddPeer to determine whether the connection houses the stream

parent 4207beae
...@@ -361,12 +361,7 @@ loop: ...@@ -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
} }
......
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