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
dms3
go-bitswap
Commits
e3f251bf
Commit
e3f251bf
authored
Apr 03, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some logic
parent
a45f185a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
decision/peer_request_queue.go
decision/peer_request_queue.go
+4
-3
No files found.
decision/peer_request_queue.go
View file @
e3f251bf
...
...
@@ -89,14 +89,15 @@ func (tl *prq) Pop() *peerRequestTask {
out
=
partner
.
taskQueue
.
Pop
()
.
(
*
peerRequestTask
)
delete
(
tl
.
taskMap
,
out
.
Key
())
if
out
.
trash
{
out
=
nil
continue
// discarding tasks that have been removed
}
partner
.
StartTask
()
partner
.
requests
--
break
// and return |out|
}
// start the new task, and push the partner back onto the queue
partner
.
StartTask
()
partner
.
requests
--
tl
.
pQueue
.
Push
(
partner
)
return
out
}
...
...
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