Skip to content

Commit

Permalink
QueryOptions.SetTimeToBlock should take pointer receiver
Browse files Browse the repository at this point in the history
Fixes a bug where blocking queries that are retried don't have their blocking 
timeout reset, resulting in them running longer than expected.
  • Loading branch information
chavacava committed Apr 18, 2022
1 parent 5628cae commit 334c258
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/12593.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
client: Fixed a bug where clients that retry blocking queries would not reset the correct blocking duration
```
2 changes: 1 addition & 1 deletion nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (q QueryOptions) TimeToBlock() time.Duration {
return q.MaxQueryTime
}

func (q QueryOptions) SetTimeToBlock(t time.Duration) {
func (q *QueryOptions) SetTimeToBlock(t time.Duration) {
q.MaxQueryTime = t
}

Expand Down

0 comments on commit 334c258

Please sign in to comment.