mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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.
This commit is contained in:
@@ -941,8 +941,7 @@ func (q *querier) mappingQuery(peer mKey) error {
|
||||
return nil
|
||||
}
|
||||
logger.Debug(q.ctx, "sending mappings", slog.F("mapping_len", len(mappings)))
|
||||
mpr.mappings <- mappings
|
||||
return nil
|
||||
return agpl.SendCtx(q.ctx, mpr.mappings, mappings)
|
||||
}
|
||||
|
||||
func (q *querier) bindingsToMappings(bindings []database.GetTailnetTunnelPeerBindingsRow) ([]mapping, error) {
|
||||
|
||||
Reference in New Issue
Block a user