Fix second muxclient context leak (#18987)

Subrouted requests were also leaking contexts in mux clients.

Similar to #18956
This commit is contained in:
Klaus Post 2024-02-06 13:35:16 -08:00 committed by GitHub
parent 22687c1f50
commit 9bcc46d93d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -360,6 +360,7 @@ func (c *Subroute) Request(ctx context.Context, h HandlerID, req []byte) ([]byte
if debugReqs {
fmt.Println(client.MuxID, c.String(), "Subroute.Request: DELETING MUX")
}
client.cancelFn(context.Canceled)
c.outgoing.Delete(client.MuxID)
}()
return client.traceRoundtrip(ctx, c.trace, h, req)