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
1c07b91c
Commit
1c07b91c
authored
Jun 14, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused success boolean
parent
f31d6fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
limiter.go
limiter.go
+5
-6
No files found.
limiter.go
View file @
1c07b91c
...
...
@@ -18,11 +18,10 @@ type dialResult struct {
}
type
dialJob
struct
{
addr
ma
.
Multiaddr
peer
peer
.
ID
ctx
context
.
Context
resp
chan
dialResult
success
bool
addr
ma
.
Multiaddr
peer
peer
.
ID
ctx
context
.
Context
resp
chan
dialResult
}
func
(
dj
*
dialJob
)
cancelled
()
bool
{
...
...
@@ -100,7 +99,7 @@ func (dl *dialLimiter) freePeerToken(dj *dialJob) {
}
waitlist
:=
dl
.
waitingOnPeerLimit
[
dj
.
peer
]
if
!
dj
.
success
&&
len
(
waitlist
)
>
0
{
if
len
(
waitlist
)
>
0
{
next
:=
waitlist
[
0
]
if
len
(
waitlist
)
==
1
{
delete
(
dl
.
waitingOnPeerLimit
,
next
.
peer
)
...
...
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