QueryOptions.SetTimeToBlock should take pointer receiver

Fixes a bug where blocking queries that are retried don't have their blocking 
timeout reset, resulting in them running longer than expected.
This commit is contained in:
chavacava 2022-04-18 16:41:27 +02:00 committed by GitHub
parent 0cf14a49cc
commit eb1c42e643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/12593.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
client: Fixed a bug where clients that retry blocking queries would not reset the correct blocking duration
```

View File

@ -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
}