mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-10-19 16:17:34 +00:00
finish inverse role server support for webtunnel: fix lint
This commit is contained in:
committed by
Xiaokang Wang (Shelikhoo)
parent
e8be10f631
commit
f5109ff585
+1
-2
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user