mirror of https://github.com/status-im/consul.git
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
|
||
|
}
|