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
06129d6f
Unverified
Commit
06129d6f
authored
Jun 10, 2020
by
Steven Allen
Committed by
GitHub
Jun 10, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #417 from ipfs/fix/peermgr-race
Fix PeerManager signalAvailabiity() race
parents
25318da3
980ca8d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
internal/peermanager/peermanager.go
internal/peermanager/peermanager.go
+3
-0
No files found.
internal/peermanager/peermanager.go
View file @
06129d6f
...
...
@@ -231,6 +231,9 @@ func (pm *PeerManager) UnregisterSession(ses uint64) {
// signalAvailability is called when a peer's connectivity changes.
// It informs interested sessions.
func
(
pm
*
PeerManager
)
signalAvailability
(
p
peer
.
ID
,
isConnected
bool
)
{
pm
.
psLk
.
Lock
()
defer
pm
.
psLk
.
Unlock
()
sesIds
,
ok
:=
pm
.
peerSessions
[
p
]
if
!
ok
{
return
...
...
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