syncthing/lib/model
Jakob Borg be0508cf26
lib/model, lib/protocol: Use error handling to avoid panic on non-started folder (fixes #6174) (#6212)
This adds error returns to model methods called by the protocol layer.
Returning an error will cause the connection to be torn down as the
message couldn't be handled. Using this to signal that a folder isn't
currently available will then cause a reconnection a few moments later,
when it'll hopefully work better.

Tested manually by running with STRECHECKDBEVERY=0 on a nontrivially
sized setup. This panics reliably before this patch, but just causes a
disconnect/reconnect now.
2019-12-04 10:46:55 +01:00
..
testdata lib/fs, lib/model: Make tests caching compatible (fixes #4749) (#4804) 2018-03-13 14:03:10 +01:00
bytesemaphore.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
bytesemaphore_test.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deviceactivity.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deviceactivity_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
doc.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
fakeconns_test.go lib/model, lib/protocol: Add contexts sending indexes and download-progress (#6176) 2019-11-25 11:07:36 +01:00
folder.go lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
folder_recvonly.go all: Remove global events.Default (ref #4085) (#5886) 2019-08-15 16:29:37 +02:00
folder_recvonly_test.go lib/model: gofmt lol :( 2019-11-29 09:29:59 +01:00
folder_sendonly.go lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
folder_sendrecv.go lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
folder_sendrecv_test.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
folder_summary.go lib/model: Also send folder summary from sync-preparing (ref #6028) (#6202) 2019-11-29 08:30:17 +01:00
folder_test.go all: Display errors while scanning in web UI (fixes #4480) (#5215) 2018-11-07 11:04:41 +01:00
folderstate.go gui, lib/model: Add new state FolderPreparingSync (fixes #6027) (#6028) 2019-10-16 09:08:54 +02:00
model.go lib/model, lib/protocol: Use error handling to avoid panic on non-started folder (fixes #6174) (#6212) 2019-12-04 10:46:55 +01:00
model_test.go lib/ignore: Don't create empty ".stignore" files (fixes #6190) (#6197) 2019-12-02 08:19:02 +01:00
progressemitter.go lib: Consistently unsubscribe from config-wrapper (fixes #6133) (#6205) 2019-12-04 07:15:00 +01:00
progressemitter_test.go lib/model, lib/protocol: Add contexts sending indexes and download-progress (#6176) 2019-11-25 11:07:36 +01:00
queue.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
queue_test.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
requests_test.go lib/model, lib/protocol: Add contexts sending indexes and download-progress (#6176) 2019-11-25 11:07:36 +01:00
sentdownloadstate.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sharedpullerstate.go lib/model: Optimise locking around conn-close and puller states (#5954) 2019-08-16 09:35:19 +02:00
sharedpullerstate_test.go lib/model: Use errors.Wrap for pull errors (#5563) 2019-03-04 13:01:52 +00:00
testos_test.go lib/model: Introduce must test utility (#5586) 2019-03-09 18:45:36 +00:00
testutils_test.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
util.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00
utils_test.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00