MCPcopy
hub / github.com/syncthing/syncthing / fail

Method fail

lib/model/sharedpullerstate.go:240–245  ·  view source on GitHub ↗

fail sets the error on the puller state compose of error, and marks the sharedPullerState as failed. Is a no-op when called on an already failed state.

(err error)

Source from the content-addressed store, hash-verified

238// fail sets the error on the puller state compose of error, and marks the
239// sharedPullerState as failed. Is a no-op when called on an already failed state.
240func (s *sharedPullerState) fail(err error) {
241 s.mut.Lock()
242 defer s.mut.Unlock()
243
244 s.failLocked(err)
245}
246
247func (s *sharedPullerState) failLocked(err error) {
248 if s.err != nil || err == nil {

Callers 6

TestReadOnlyDirFunction · 0.95
copierRoutineMethod · 0.80
copyBlockFromFileMethod · 0.80
pullerRoutineMethod · 0.80
pullBlockMethod · 0.80

Calls 2

failLockedMethod · 0.95
UnlockMethod · 0.80

Tested by 2

TestReadOnlyDirFunction · 0.76