syncthing/cmd/syncthing
Audrius Butkevicius 44a542391e lib/connections: Trust the model to tell us if we are connected
This should address issue as described in https://forum.syncthing.net/t/stun-nig-party-with-paused-devices/10942/13
Essentially the model and the connection service goes out of sync in terms of thinking if we are connected or not.
Resort to model as being the ultimate source of truth.

I can't immediately pin down how this happens, yet some ideas.

ConfigSaved happens in separate routine, so it's possbile that we have some sort of device removed yet connection comes in parallel kind of thing.
However, in this case the connection exists in the model, and does not exist in the connection service and the only way for the connection to be removed
in the connection service is device removal from the config.

Given the subject, this might also be related to the device being paused.

Also, adds more info to the logs

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4533
2017-11-21 07:25:38 +00:00
..
testdata Fix STGUIASSETS search paths & order (fixes #2827) 2016-03-12 12:17:25 +00:00
.gitignore Repair model tests 2014-03-30 21:59:40 +02:00
.stfolder Merge remote-tracking branch 'syncthing/pr/1577' 2015-04-06 20:53:32 +02:00
auditservice_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
auditservice.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
blockprof.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
buildtag_noupgrade.go cmd/syncthing: Append build tags used to the long version string 2017-03-16 23:40:27 +00:00
buildtag_race.go cmd/syncthing: Append build tags used to the long version string 2017-03-16 23:40:27 +00:00
cpuusage_solaris.go cmd/syncthing: Use a 10 second EWMA for CPU usage, refactor a little 2017-04-20 08:33:09 +00:00
cpuusage_unix.go cmd/syncthing: Use a 10 second EWMA for CPU usage, refactor a little 2017-04-20 08:33:09 +00:00
cpuusage_windows.go cmd/syncthing: Process handle should be closed 2017-05-14 18:06:27 +02:00
cpuusage.go cmd/syncthing: Start CPU usage monitoring not from init (fixes #4183) 2017-05-31 18:14:04 +00:00
debug.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
gui_auth.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
gui_csrf.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
gui_statics.go cmd/syncthing: Add some common security releated HTTP headers (fixes #4360) 2017-09-10 08:28:12 +00:00
gui_test.go all: Typos 2017-07-20 13:10:46 +00:00
gui.go lib/connections: Trust the model to tell us if we are connected 2017-11-21 07:25:38 +00:00
heapprof.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
locations.go all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
main_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
main.go all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
memsize_darwin.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
memsize_linux.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
memsize_netbsd.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
memsize_solaris.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
memsize_unimpl.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
memsize_windows.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
mocked_config_test.go cmd/syncthing, lib/config: Pause/resume all devices whithout argument 2017-03-04 07:54:13 +00:00
mocked_connections_test.go cmd/syncthing: Add more stats to usage reports (ref #3628) 2017-10-12 06:16:46 +00:00
mocked_cpuusage_test.go cmd/syncthing: Start CPU usage monitoring not from init (fixes #4183) 2017-05-31 18:14:04 +00:00
mocked_discovery_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
mocked_events_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
mocked_logger_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
mocked_model_test.go lib/connections: Trust the model to tell us if we are connected 2017-11-21 07:25:38 +00:00
monitor_test.go cmd/syncthing: Add test for truncate behavior of log file (ref #4255) 2017-09-02 06:56:35 +00:00
monitor.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
openurl_unix.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
openurl_windows.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
perfstats_unix.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
summaryservice.go lib/connections: Trust the model to tell us if we are connected 2017-11-21 07:25:38 +00:00
superuser_unix.go cmd/syncthing: Warn when running as a super user (fixes #4123) 2017-05-15 05:42:21 +00:00
superuser_windows.go cmd/syncthing: Warn when running as a super user (fixes #4123) 2017-05-15 05:42:21 +00:00
traceback.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
usage_report.go lib/model: Incremental block stats usage reporting 2017-11-09 21:16:29 +00:00
usage.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
verboseservice.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00