consul/vendor/github.com/inconshreveable/muxado/proto/buffer/shared.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
}