syncthing/lib/connections
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
..
config.go lib/connections, vendor: Change KCP mux to SMUX 2017-03-09 14:03:09 +01:00
connections_test.go lib/connections: Allow negative ACL entries on devices (fixes #4096) 2017-04-13 17:43:29 +00:00
debug.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
kcp_dial.go lib/connections: Consistent log levels & polish (fixes #4510) 2017-11-14 21:49:36 +00:00
kcp_listen.go lib/connections: Only announce punchable nats (fixes #4519) 2017-11-17 14:46:45 +00:00
kcp_misc.go lib/connections: Add KCP blacklist period 2017-10-22 13:56:52 +01:00
limiter.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
relay_dial.go lib/connections: Consistent log levels & polish (fixes #4510) 2017-11-14 21:49:36 +00:00
relay_listen.go lib/connections: Consistent log levels & polish (fixes #4510) 2017-11-14 21:49:36 +00:00
service.go lib/connections: Trust the model to tell us if we are connected 2017-11-21 07:25:38 +00:00
structs.go lib/connections: Trust the model to tell us if we are connected 2017-11-21 07:25:38 +00:00
tcp_dial.go lib/connections: Consistent log levels & polish (fixes #4510) 2017-11-14 21:49:36 +00:00
tcp_listen.go lib/connections: Fix race condition in parallel dial, minor cleanups (fixes #4526) 2017-11-19 17:38:13 +00:00
util.go lib/connections: Add KCP support (fixes #804) 2017-03-07 12:44:16 +00:00