Have Consul's transaction handler use the permit pool
This commit is contained in:
parent
220beb2cde
commit
ff3c3db91b
|
@ -321,6 +321,9 @@ func (c *ConsulBackend) Transaction(txns []TxnEntry) error {
|
|||
ops = append(ops, cop)
|
||||
}
|
||||
|
||||
c.permitPool.Acquire()
|
||||
defer c.permitPool.Release()
|
||||
|
||||
ok, resp, _, err := c.kv.Txn(ops, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue