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
256e680c
Commit
256e680c
authored
Apr 04, 2019
by
hannahhoward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(messagequeue): add nil check
Make sure rebroadcast timer doesn't get reset if it's nil
parent
076f7091
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
messagequeue/messagequeue.go
messagequeue/messagequeue.go
+3
-1
No files found.
messagequeue/messagequeue.go
View file @
256e680c
...
...
@@ -79,7 +79,9 @@ func (mq *MessageQueue) AddWantlist(initialWants *wantlist.SessionTrackedWantlis
func
(
mq
*
MessageQueue
)
SetRebroadcastInterval
(
delay
time
.
Duration
)
{
mq
.
rebroadcastIntervalLk
.
Lock
()
mq
.
rebroadcastInterval
=
delay
if
mq
.
rebroadcastTimer
!=
nil
{
mq
.
rebroadcastTimer
.
Reset
(
delay
)
}
mq
.
rebroadcastIntervalLk
.
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