Skip to content

Commit

Permalink
Don't time out proxy handler
Browse files Browse the repository at this point in the history
  • Loading branch information
atburke authored and github-actions committed May 1, 2024
1 parent c1f9af7 commit 3bd6cc4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/testhelpers/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"net/http/httptest"
"sync"
"testing"
"time"

"github.com/gravitational/trace"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -88,9 +87,9 @@ func (p *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
go replicate(sconn, dconn)
go replicate(dconn, io.MultiReader(buf, sconn))

// Wait until done, error, or 10 second.
// Wait until done.
select {
case <-time.After(10 * time.Second):
case <-r.Context().Done():
case <-errc:
}
}
Expand Down

0 comments on commit 3bd6cc4

Please sign in to comment.