Commit 224c2965 authored by hannahhoward's avatar hannahhoward

fix(allocator): remove peer from peer status list

remove peer from peer status list when deallocing peer memory
parent 08f4b8be
......@@ -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")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment