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
6c412605
Commit
6c412605
authored
Apr 13, 2020
by
Dirk McCormick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: remove unnecessary func param
parent
efd006e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
internal/messagequeue/messagequeue.go
internal/messagequeue/messagequeue.go
+3
-3
No files found.
internal/messagequeue/messagequeue.go
View file @
6c412605
...
...
@@ -439,7 +439,7 @@ func (mq *MessageQueue) sendMessage() {
for
i
:=
0
;
i
<
maxRetries
;
i
++
{
if
mq
.
attemptSendAndRecovery
(
message
)
{
// We were able to send successfully.
onSent
(
wantlist
)
onSent
()
mq
.
simulateDontHaveWithTimeout
(
wantlist
)
...
...
@@ -540,7 +540,7 @@ func (mq *MessageQueue) pendingWorkCount() int {
}
// Convert the lists of wants into a Bitswap message
func
(
mq
*
MessageQueue
)
extractOutgoingMessage
(
supportsHave
bool
)
(
bsmsg
.
BitSwapMessage
,
func
(
[]
bsmsg
.
Entry
))
{
func
(
mq
*
MessageQueue
)
extractOutgoingMessage
(
supportsHave
bool
)
(
bsmsg
.
BitSwapMessage
,
func
())
{
mq
.
wllock
.
Lock
()
defer
mq
.
wllock
.
Unlock
()
...
...
@@ -595,7 +595,7 @@ func (mq *MessageQueue) extractOutgoingMessage(supportsHave bool) (bsmsg.BitSwap
}
// Called when the message has been successfully sent.
onMessageSent
:=
func
(
wantlist
[]
bsmsg
.
Entry
)
{
onMessageSent
:=
func
()
{
mq
.
wllock
.
Lock
()
defer
mq
.
wllock
.
Unlock
()
...
...
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