tailscale/tsnet
Harry Harpham 1e2fdfd745 tsnet: fix bug in closing multiple ServiceListeners at once
Prior to this change, closing multiple ServiceListeners concurrently
could result in failures as the independent close operations vie for the
attention of the Server's LocalBackend. The close operations would each
obtain the current ETag of the serve config and try to write new serve
config using this ETag. When one write invalidated the ETag of another,
the latter would fail. Exacerbating the issue, ServiceListener.Close
cannot be retried.

This change resolves the bug by using Server.mu to synchronize across
all ServiceListener.Close operations, ensuring they happen serially.

Fixes #19169

Signed-off-by: Harry Harpham <harry@tailscale.com>
2026-04-01 08:24:17 -06:00
..
example all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
depaware.txt derp,types,util: use bufio Peek+Discard for allocation-free fast reads (#19067) 2026-03-24 10:52:20 -04:00
example_tshello_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
example_tsnet_listen_service_multiple_ports_test.go tsnet: make ListenService examples consistent with other tsnet examples 2026-01-26 14:59:18 -07:00
example_tsnet_test.go tsnet: make ListenService examples consistent with other tsnet examples 2026-01-26 14:59:18 -07:00
packet_filter_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tsnet_test.go tsnet: fix bug in closing multiple ServiceListeners at once 2026-04-01 08:24:17 -06:00
tsnet.go tsnet: fix bug in closing multiple ServiceListeners at once 2026-04-01 08:24:17 -06:00