Skip to content

Commit

Permalink
use context.Context passed in as function parameter in repeated dials…
Browse files Browse the repository at this point in the history
… to App
  • Loading branch information
bashar-515 committed Jan 27, 2025
1 parent 1fd26c1 commit 0511a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grpc/app_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewAppConn(ctx context.Context, cloud *config.Cloud, logger logging.Logger)
for {
appConn.connMu.Lock()

ctxWithTimeOut, ctxWithTimeOutCancel := context.WithTimeout(context.Background(), 5*time.Second)
ctxWithTimeOut, ctxWithTimeOutCancel := context.WithTimeout(ctx, 5*time.Second)

appConn.conn, err = rpc.DialDirectGRPC(ctxWithTimeOut, grpcURL.Host, logger, dialOpts...)
if errors.Is(err, context.DeadlineExceeded) {
Expand Down

0 comments on commit 0511a68

Please sign in to comment.