File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,13 @@ func (m *Manager) syncReplicas(ctx context.Context) error {
219
219
}
220
220
m .mutex .Unlock ()
221
221
222
+ client := http.Client {
223
+ Timeout : m .options .PeerTimeout ,
224
+ Transport : & http.Transport {
225
+ TLSClientConfig : m .options .TLSConfig ,
226
+ },
227
+ }
228
+ defer client .CloseIdleConnections ()
222
229
var wg sync.WaitGroup
223
230
var mu sync.Mutex
224
231
failed := make ([]string , 0 )
@@ -232,12 +239,6 @@ func (m *Manager) syncReplicas(ctx context.Context) error {
232
239
slog .F ("relay_address" , peer .RelayAddress ), slog .Error (err ))
233
240
return
234
241
}
235
- client := http.Client {
236
- Timeout : m .options .PeerTimeout ,
237
- Transport : & http.Transport {
238
- TLSClientConfig : m .options .TLSConfig ,
239
- },
240
- }
241
242
res , err := client .Do (req )
242
243
if err != nil {
243
244
mu .Lock ()
You can’t perform that action at this time.
0 commit comments