mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: add necessary locking
This commit is contained in:
parent
976236b083
commit
56318f5433
@ -289,6 +289,8 @@ func (t *Transport) ActiveSince(id types.ID) time.Time {
|
||||
}
|
||||
|
||||
func (t *Transport) SendSnapshot(m snap.Message) {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
p := t.peers[types.ID(m.To)]
|
||||
if p == nil {
|
||||
m.CloseWithError(errMemberNotFound)
|
||||
|
Loading…
x
Reference in New Issue
Block a user