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

Method disconnect

db/active_replicator_common.go:342–349  ·  view source on GitHub ↗

disconnect will disconnect and stop the replicator, but not set the state - such that it will be reassigned and started again.

()

Source from the content-addressed store, hash-verified

340
341// disconnect will disconnect and stop the replicator, but not set the state - such that it will be reassigned and started again.
342func (arc *activeReplicatorCommon) disconnect() error {
343 arc.lock.Lock()
344 base.TracefCtx(arc.ctx, base.KeyReplicate, "Calling disconnect without stopping the replicator")
345 err := arc._disconnect()
346 arc._publishStatus()
347 arc.lock.Unlock()
348 return err
349}
350
351// stopAndDisconnect runs _disconnect and _stop on the replicator, and sets the Stopped replication state.
352func (arc *activeReplicatorCommon) stopAndDisconnect() error {

Callers 1

_startSendingChangesMethod · 0.80

Calls 5

_disconnectMethod · 0.95
_publishStatusMethod · 0.95
TracefCtxFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected