mirror of https://github.com/hashicorp/consul
11 lines
188 B
Go
11 lines
188 B
Go
|
package buffer
|
||
|
|
||
|
func BothClosed(in *Inbound, out *Outbound) (closed bool) {
|
||
|
in.L.Lock()
|
||
|
out.L.Lock()
|
||
|
closed = (in.err != nil && out.err != nil)
|
||
|
out.L.Unlock()
|
||
|
in.L.Unlock()
|
||
|
return
|
||
|
}
|