Skip to content

Commit 34dff0f

Browse files
Update internal/driverutil/operation.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 62f8bc4 commit 34dff0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/driverutil/operation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func CalculateMaxTimeMS(ctx context.Context, rttMin time.Duration) (int64, bool)
5151

5252
// Always round up to the next millisecond value so we never truncate the calculated
5353
// maxTimeMS value (e.g. 400 microseconds evaluates to 1ms, not 0ms).
54-
maxTimeMS := int64((remainingTimeout - rttMin) / time.Millisecond)
54+
maxTimeMS := int64((remainingTimeout - rttMin + time.Millisecond - 1) / time.Millisecond)
5555
if maxTimeMS <= 0 {
5656
return 0, false
5757
}

0 commit comments

Comments
 (0)