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-graphsync
Commits
224c2965
Commit
224c2965
authored
Oct 27, 2020
by
hannahhoward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(allocator): remove peer from peer status list
remove peer from peer status list when deallocing peer memory
parent
08f4b8be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
responsemanager/allocator/allocator.go
responsemanager/allocator/allocator.go
+1
-0
No files found.
responsemanager/allocator/allocator.go
View file @
224c2965
...
...
@@ -80,6 +80,7 @@ func (a *Allocator) ReleasePeerMemory(p peer.ID) error {
return
errors
.
New
(
"cannot deallocate peer with no allocations"
)
}
a
.
peerStatusQueue
.
Remove
(
status
.
Index
())
delete
(
a
.
peerStatuses
,
p
)
for
_
,
pendingAllocation
:=
range
status
.
pendingAllocations
{
pendingAllocation
.
response
<-
errors
.
New
(
"Peer has been deallocated"
)
}
...
...
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