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-swarm
Commits
be3e9404
Commit
be3e9404
authored
Apr 01, 2021
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename dialWorker to startDialWorker
parent
17bc04b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
swarm.go
swarm.go
+1
-1
swarm_dial.go
swarm_dial.go
+2
-2
No files found.
swarm.go
View file @
be3e9404
...
@@ -121,7 +121,7 @@ func NewSwarm(ctx context.Context, local peer.ID, peers peerstore.Peerstore, bwc
...
@@ -121,7 +121,7 @@ func NewSwarm(ctx context.Context, local peer.ID, peers peerstore.Peerstore, bwc
}
}
}
}
s
.
dsync
=
newDialSync
(
s
.
d
ialWorker
)
s
.
dsync
=
newDialSync
(
s
.
startD
ialWorker
)
s
.
limiter
=
newDialLimiter
(
s
.
dialAddr
,
s
.
IsFdConsumingAddr
)
s
.
limiter
=
newDialLimiter
(
s
.
dialAddr
,
s
.
IsFdConsumingAddr
)
s
.
proc
=
goprocessctx
.
WithContext
(
ctx
)
s
.
proc
=
goprocessctx
.
WithContext
(
ctx
)
s
.
ctx
=
goprocessctx
.
OnClosingContext
(
s
.
proc
)
s
.
ctx
=
goprocessctx
.
OnClosingContext
(
s
.
proc
)
...
...
swarm_dial.go
View file @
be3e9404
...
@@ -295,8 +295,8 @@ type dialResponse struct {
...
@@ -295,8 +295,8 @@ type dialResponse struct {
err
error
err
error
}
}
//
d
ialWorker
i
s an active dial goroutine that synchronizes and executes concurrent dials
//
startD
ialWorker
start
s an active dial goroutine that synchronizes and executes concurrent dials
func
(
s
*
Swarm
)
d
ialWorker
(
ctx
context
.
Context
,
p
peer
.
ID
,
reqch
<-
chan
dialRequest
)
error
{
func
(
s
*
Swarm
)
startD
ialWorker
(
ctx
context
.
Context
,
p
peer
.
ID
,
reqch
<-
chan
dialRequest
)
error
{
if
p
==
s
.
local
{
if
p
==
s
.
local
{
return
ErrDialToSelf
return
ErrDialToSelf
}
}
...
...
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