finish inverse role server support for webtunnel: fix lint

This commit is contained in:
Shelikhoo
2025-11-20 19:55:41 +00:00
committed by Xiaokang Wang (Shelikhoo)
parent e8be10f631
commit f5109ff585
@@ -83,13 +83,12 @@ func (c *clientRoundtripper) roundTrip(request *http.Request) (*http.Response, e
}
defer c.currentConnLock.RUnlock()
timeoutContext, cancelOnErr := context.WithTimeout(context.Background(), time.Second*30)
timeoutContext, _ := context.WithTimeout(context.Background(), time.Second*30) //nolint:govet
request = request.WithContext(timeoutContext)
resp, err := c.currentConn.RoundTrip(request)
// Use the current connection to perform the round trip
if err != nil {
cancelOnErr()
if resp != nil && resp.Body != nil {
resp.Body.Close()
}