mirror of
https://github.com/status-im/status-go.git
synced 2025-01-22 04:31:30 +00:00
fix_: keep community locks map unreleased when Manager stops
`ReevaluateMembers` is run as a separate goroutine and sometimes it is executed after `Manager` has been stopped. It tries to use the lock and in consequence, it panics. Ensuring the map is still there prevents that. ^Happened in test: `TestCreateTokenPermission`.
This commit is contained in:
parent
9d309886f7
commit
bd91f5ab49
@ -150,10 +150,6 @@ func (c *CommunityLock) Init() {
|
||||
c.locks = make(map[string]*sync.Mutex)
|
||||
}
|
||||
|
||||
func (c *CommunityLock) Release() {
|
||||
c.locks = nil
|
||||
}
|
||||
|
||||
type HistoryArchiveDownloadTask struct {
|
||||
CancelChan chan struct{}
|
||||
Waiter sync.WaitGroup
|
||||
@ -579,7 +575,6 @@ func (m *Manager) Stop() error {
|
||||
close(c)
|
||||
}
|
||||
m.StopTorrentClient()
|
||||
m.communityLock.Release()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user