MSP-7621 remove proxy timeout
This commit is contained in:
1 parent
af927eac7b
commit
5b234c8f3d
1 file changed
+2
-7
+2
-7
@@ -11,7 +11,6 @@ import (
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
http2 "github.com/txix-open/isp-kit/http"
|
||||
@@ -27,7 +26,6 @@ import (
|
||||
|
||||
const (
|
||||
maxMessageSize = 64 * 1024 * 1024
|
||||
proxyTimeout = 5 * time.Second
|
||||
)
|
||||
|
||||
type Proxy interface {
|
||||
@@ -205,12 +203,9 @@ func (l Locator) registerEndpoint(
|
||||
|
||||
mux.Handler(routeKey.Method, path,
|
||||
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx, cancel := context.WithTimeout(r.Context(), proxyTimeout)
|
||||
defer cancel()
|
||||
|
||||
err := handler(ctx, w, r)
|
||||
err := handler(r.Context(), w, r)
|
||||
if err != nil {
|
||||
l.logger.Error(ctx, err)
|
||||
l.logger.Error(r.Context(), err)
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user