MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / setCloseError

Method setCloseError

base/dcp_client.go:624–636  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

622}
623
624func (dc *DCPClient) setCloseError(err error) {
625 dc.closeErrorLock.Lock()
626 defer dc.closeErrorLock.Unlock()
627 // If the DCPClient is already closing, don't update the error. If an initial error triggered the close,
628 // then closeError will already be set. In the event of a requested close, we want to ignore EOF errors associated
629 // with stream close
630 if dc.closing.IsTrue() {
631 return
632 }
633 if dc.closeError == nil {
634 dc.closeError = err
635 }
636}
637
638func (dc *DCPClient) getCloseError() error {
639 dc.closeErrorLock.Lock()

Callers 1

fatalErrorMethod · 0.95

Calls 3

IsTrueMethod · 0.80
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected