mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-02-05 06:10:09 +08:00
fix other race
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This commit is contained in:
parent
33ea692817
commit
1542834878
@ -317,6 +317,8 @@ func (ab *dsAddrBook) storeSignedPeerRecord(p peer.ID, envelope *record.Envelope
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pr.Lock()
|
||||
defer pr.Unlock()
|
||||
pr.CertifiedRecord = &pb.AddrBookRecord_CertifiedRecord{
|
||||
Seq: rec.Seq,
|
||||
Raw: envelopeBytes,
|
||||
|
Loading…
Reference in New Issue
Block a user