mirror of
https://github.com/status-im/status-go.git
synced 2025-01-24 13:41:24 +00:00
fix(protocol): crash in concurrent map write/read
This commit is contained in:
parent
2dc1b48968
commit
33c46dd59d
@ -123,6 +123,9 @@ func (m *EnvelopesMonitor) Add(identifiers [][]byte, envelopeHashes []types.Hash
|
||||
return errors.New("hashes don't match messages")
|
||||
}
|
||||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
for _, identifier := range identifiers {
|
||||
m.identifierHashes[string(identifier)] = envelopeHashes
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user