Josh Bleecher Snyder
26b0dca4f5
device: fix data race in peer.timersActive
...
Found by the race detector and existing tests.
To avoid introducing a lock into this hot path,
calculate and cache whether any peers exist.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-16 16:16:26 -08:00
Josh Bleecher Snyder
e739ff71a5
device: fix persistent_keepalive_interval data races
...
Co-authored-by: David Anderson <danderson@tailscale.com>
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-15 16:57:09 -08:00
Josh Bleecher Snyder
cb94af035e
device: use defer to simplify peer.NewTimer
...
This also makes the lifetime of modifyingLock more prominent.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-15 18:08:24 +01:00
Jason A. Donenfeld
db0aa39b76
global: update header comments and modules
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-05-02 02:08:26 -06:00
Jason A. Donenfeld
f70546bc2e
device: timers: add jitter on ack failure reinitiation
2019-05-24 13:48:25 +02:00
Jason A. Donenfeld
69f0fe67b6
global: begin modularization
2019-03-03 05:00:40 +01:00