Skip to content

Commit 08f23e2

Browse files
committed
remove background context
1 parent 76427f4 commit 08f23e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/packages/gateway/gateway.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ func (g *Gateway) registerRelayIsActive(ctx context.Context, relayAddress string
341341
EnableDatagrams: true,
342342
}
343343
func() {
344-
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
344+
checkCtx, cancel := context.WithTimeout(ctx, 3*time.Second)
345345
defer cancel()
346-
conn, err := quic.DialAddr(ctx, relayAddress, tlsConfig, quicConfig)
346+
conn, err := quic.DialAddr(checkCtx, relayAddress, tlsConfig, quicConfig)
347347
if err != nil {
348348
failures++
349349
log.Warn().Err(err).Int("failures", failures).Msg("Relay connection check failed")

0 commit comments

Comments
 (0)