Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-pubsub
Commits
31c9b219
Commit
31c9b219
authored
May 18, 2020
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the proto we already have in AddPeer to determine whether the connection houses the stream
parent
4207beae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
gossipsub.go
gossipsub.go
+1
-6
No files found.
gossipsub.go
View file @
31c9b219
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment