mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
perf: modernize io paths and reduce proxy allocations
This commit is contained in:
parent
02861b5537
commit
54f7de0c60
11 changed files with 312 additions and 29 deletions
|
|
@ -1866,7 +1866,9 @@ func TestReverseProxyHTTP2ExtendedConnectForcesHTTP1ToTLSUpstream(t *testing.T)
|
|||
if message != "echo:ping\n" {
|
||||
t.Fatalf("unexpected tunneled response body: %q", message)
|
||||
}
|
||||
_ = pw.Close()
|
||||
if err := pw.Close(); err != nil {
|
||||
t.Fatalf("close tunneled request body: %v", err)
|
||||
}
|
||||
|
||||
select {
|
||||
case err := <-errCh:
|
||||
|
|
@ -2215,7 +2217,9 @@ func TestReverseProxyHTTP2ExtendedConnectCancelDoesNotTriggerProxyError(t *testi
|
|||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
cancel()
|
||||
_ = pw.CloseWithError(context.Canceled)
|
||||
if err := pw.CloseWithError(context.Canceled); err != nil {
|
||||
t.Fatalf("close request body with cancellation: %v", err)
|
||||
}
|
||||
select {
|
||||
case <-writeErrCh:
|
||||
case <-time.After(2 * time.Second):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue