Skip to content

Commit 2dce571

Browse files
committed
re-ordering stuff
1 parent 508db5c commit 2dce571

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

httpclient/client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ func (c *ClientConfig) Build() (*Client, error) {
121121
c.Sugar,
122122
concurrencyMetrics,
123123
)
124-
} else {
125-
concurrencyHandler = nil
126124
}
127125

128126
client := &Client{

httpclient/request.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,18 +274,15 @@ func (c *Client) request(ctx context.Context, method, endpoint string, body inte
274274
return nil, err
275275
}
276276

277-
req = req.WithContext(ctx)
278-
279-
// TODO Concurrency - Refactor or remove this
280277
startTime := time.Now()
281278

279+
req = req.WithContext(ctx)
282280
resp, err := c.http.Do(req)
283281
if err != nil {
284282
c.Sugar.Error("Failed to send request", zap.String("method", method), zap.String("endpoint", endpoint), zap.Error(err))
285283
return nil, err
286284
}
287285

288-
// TODO Concurrency - Refactor or remove this
289286
if c.config.EnableConcurrencyManagement {
290287
duration := time.Since(startTime)
291288
c.Concurrency.EvaluateAndAdjustConcurrency(resp, duration)

0 commit comments

Comments
 (0)