You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn/ipnserver
Nick Khyl 6fac2903e1 ipn/ipnserver: fix race condition where LocalBackend is reset after a different user connects
In this commit, we add a failing test to verify that ipn/ipnserver.Server correctly
sets and unsets the current user when two different clients send requests concurrently
(A sends request, B sends request, A's request completes, B's request completes).

The expectation is that the user who wins the race becomes the current user
from the LocalBackend's perspective, remaining in this state until they disconnect,
after which a different user should be able to connect and use the LocalBackend.

We then fix the second of two bugs in (*Server).addActiveHTTPRequest, where a race
condition causes the LocalBackend's state to be reset after a new client connects,
instead of after the last active request of the previous client completes and the server
becomes idle.

Fixes tailscale/corp#25804

Signed-off-by: Nick Khyl <nickk@tailscale.com>
11 months ago
..
actor.go ipn/ipnserver: use ipnauth.Actor instead of *ipnserver.actor whenever possible 11 months ago
proxyconnect.go Switch logging service from log.tailscale.io to log.tailscale.com (#14398) 1 year ago
proxyconnect_js.go all: update copyright and license headers 3 years ago
server.go ipn/ipnserver: fix race condition where LocalBackend is reset after a different user connects 11 months ago
server_test.go ipn/ipnserver: fix race condition where LocalBackend is reset after a different user connects 11 months ago