Skip to content

Commit

Permalink
use context.WithDeadline instead; update googleapis
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbraemer committed Feb 16, 2022
1 parent a4e768e commit 6f0af16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ deps:
owner: googleapis
repository: googleapis
branch: main
commit: 287d292a82ac42bf89fa460852beb95a
digest: b1-sdZITubeC1wjF5xGyHJjL1Uv7nvjlgPmQYKdfwMecX4=
create_time: 2022-02-01T15:10:56.701418Z
commit: 7cc90235b0b34a33961f2d27162fbfb7
digest: b1-7aR1G7jkTCelrf6_GT5R5Y98Qn4OGNiqntQyrbZGTio=
create_time: 2022-02-16T15:20:23.829328Z
2 changes: 1 addition & 1 deletion deadline.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (d *deadline) SetDeadline(t time.Time) error {
d.timeout = context.Background()
}
if !t.IsZero() {
d.timeout, d.timeoutCancel = context.WithTimeout(context.Background(), time.Until(t))
d.timeout, d.timeoutCancel = context.WithDeadline(context.Background(), t)
}
return nil
}

0 comments on commit 6f0af16

Please sign in to comment.