tailscale/ipn/localapi
salman eec734a578 ipn/{ipnlocal,localapi}: ensure watcher is installed before /watch-ipn-bus/ responds with 200
This change delays the first flush in the /watch-ipn-bus/ handler
until after the watcher has been successfully installed on the IPN
bus. It does this by adding a new onWatchAdded callback to
LocalBackend.WatchNotifications().

Without this, the endpoint returns a 200 almost immediatly, and
only then installs a watcher for IPN events.  This means there's a
small window where events could be missed by clients after calling
WatchIPNBus().

Fixes tailscale/corp#8594.

Signed-off-by: salman <salman@tailscale.com>
2023-01-17 22:59:39 +00:00
..
cert.go ipn/{ipnlocal,localapi}: move most of cert.go to ipnlocal 2022-11-07 21:50:04 -08:00
debugderp.go cmd/tailscale: add start of "debug derp" subcommand 2022-11-26 15:40:25 -08:00
disabled_stubs.go all: remove old +build tags 2022-11-04 07:25:42 -07:00
localapi.go ipn/{ipnlocal,localapi}: ensure watcher is installed before /watch-ipn-bus/ responds with 200 2023-01-17 22:59:39 +00:00
pprof.go ipn/localapi: rename /profile to /pprof 2022-11-10 12:02:16 -08:00