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
39fc35f7
Commit
39fc35f7
authored
May 16, 2020
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if already in the mesh in handleGraft to support concurrent grafting
parent
eef4d41e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
gossipsub.go
gossipsub.go
+6
-0
No files found.
gossipsub.go
View file @
39fc35f7
...
...
@@ -537,6 +537,12 @@ func (gs *GossipSubRouter) handleGraft(p peer.ID, ctl *pb.ControlMessage) []*pb.
continue
}
// check if it is already in the mesh; if so do nothing (we might have concurrent grafting)
_
,
inMesh
:=
peers
[
p
]
if
inMesh
{
continue
}
// we don't GRAFT to/from direct peers; complain loudly if this happens
_
,
direct
:=
gs
.
direct
[
p
]
if
direct
{
...
...
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