Skip to content

Commit

Permalink
Merge branch 'GODRIVER-2348' of github.com:prestonvasquez/mongo-go-dr…
Browse files Browse the repository at this point in the history
…iver into GODRIVER-2348
  • Loading branch information
prestonvasquez committed Mar 18, 2024
2 parents db69938 + 884f2ba commit 058b343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/csot/csot.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func IsTimeoutContext(ctx context.Context) bool {
func WithTimeout(parent context.Context, timeout *time.Duration) (context.Context, context.CancelFunc) {
cancel := func() {}

if IsTimeoutContext(parent) || timeout == nil {
if timeout == nil || IsTimeoutContext(parent) {
// In the following conditions, do nothing:
// 1. The parent already has a deadline
// 2. The parent does not have a deadline, but a client-level timeout has
Expand Down

0 comments on commit 058b343

Please sign in to comment.