mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcd: fix a race in peer.go
This commit is contained in:
parent
6dc49def25
commit
2e59635bea
@ -89,8 +89,8 @@ func (p *peer) send(d []byte) error {
|
||||
if p.inflight.Get() > maxInflight {
|
||||
return fmt.Errorf("reach max idle")
|
||||
}
|
||||
go func() {
|
||||
p.wg.Add(1)
|
||||
go func() {
|
||||
p.post(d)
|
||||
p.wg.Done()
|
||||
}()
|
||||
|
Loading…
x
Reference in New Issue
Block a user