syncthing/lib
Audrius Butkevicius 075a699aae 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 08:32:23 +01:00
..
auto all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
beacon lib/beacon: Don't exit after a single write failure (fixes #4414) 2017-10-12 07:13:44 +00:00
config all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
connections lib/connections: Trust the model to tell us if we are connected 2017-11-21 08:32:23 +01:00
db lib/db: Refactor away the large genericReplace thing 2017-11-12 20:20:34 +00:00
dialer all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
discover Fix discovery in the absence of listen addresses (fixes #4418) 2017-11-17 09:12:35 +00:00
events cmd/syncthing: Allow custom event subscriptions (fixes #1879) 2017-04-13 17:14:34 +00:00
fs lib/fs: Add case insensitivity to MtimeFS 2017-11-17 12:10:16 +00:00
ignore lib/ignore: Consistent behaviour for nil *Matcher 2017-09-06 06:39:18 +00:00
logger cmd/syncthing, lib/logger: Set debug flags on SetDebug for tests 2017-06-02 07:04:06 +00:00
model lib/connections: Trust the model to tell us if we are connected 2017-11-21 08:32:23 +01:00
nat all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
osutil all: Fix comment typos 2017-11-04 07:20:11 +00:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
rand all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
rc test: Mend tests for latest event changes etc 2017-11-13 00:25:07 +01:00
relay all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
scanner lib/model: Handle type changes when pulling (ref #4505 #4506 #4507) 2017-11-13 15:16:27 +00:00
sha256 cmd/syncthing, lib/sha256: Skip CPU benchmarks when user decided (fixes #4348) 2017-09-06 06:55:47 +00:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sync lib/sync: Make some tests not depend on real clock 2017-04-01 11:03:11 +00:00
tlsutil lib/tlsutil: Remove undesired bufio from UnionedConnection (ref #4245) 2017-08-31 07:34:48 +00:00
upgrade lib/upgrade: 0.x to 1.0 is a minor upgrade 2017-06-25 14:17:43 +00:00
upnp lib/connections: Consistent log levels & polish (fixes #4510) 2017-11-14 21:49:36 +00:00
util all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
versioner all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
watchaggregator lib/watchaggregator: Don't care about timings during testing on darwin 2017-11-10 17:05:31 +00:00
weakhash all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00