Skip to content

Commit b34ecf1

Browse files
authored
fix: fix deadlock of mappingQuery on context canceled
Fixes #11078 replace bare channel send with SendCtx so that we properly shut down when context is canceled.
1 parent 941e387 commit b34ecf1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

enterprise/tailnet/pgcoord.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,7 @@ func (q *querier) mappingQuery(peer mKey) error {
941941
return nil
942942
}
943943
logger.Debug(q.ctx, "sending mappings", slog.F("mapping_len", len(mappings)))
944-
mpr.mappings <- mappings
945-
return nil
944+
return agpl.SendCtx(q.ctx, mpr.mappings, mappings)
946945
}
947946

948947
func (q *querier) bindingsToMappings(bindings []database.GetTailnetTunnelPeerBindingsRow) ([]mapping, error) {

0 commit comments

Comments
 (0)