mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
transport: make tr stop safe
This commit is contained in:
parent
c6455ba2ce
commit
ea688c1f06
@ -187,6 +187,8 @@ func (t *Transport) Send(msgs []raftpb.Message) {
|
||||
}
|
||||
|
||||
func (t *Transport) Stop() {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
for _, r := range t.remotes {
|
||||
r.stop()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user