Skip to content

Commit 7aa954b

Browse files
committed
use context from function
1 parent 52fc30c commit 7aa954b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ func registerCollector(logger *slog.Logger, transport *http.Transport,
230230
os.Exit(1)
231231
}
232232

233-
transport.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) {
233+
transport.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
234234
d := &net.Dialer{}
235-
return d.DialContext(context.Background(), "unix", socketPath)
235+
return d.DialContext(ctx, "unix", socketPath)
236236
}
237237
addr = "http://unix" + requestPath
238238
}

0 commit comments

Comments
 (0)