Allow timeout to complete
When the timeout it reached, the query can still fail to complete if the caller isn't consuming the results from the channel. This change allows the query to exit in any case.
This commit is contained in:
parent
ab413e42fe
commit
bf498197cb
@ -335,6 +335,8 @@ func (c *client) query(params *QueryParam) error {
|
|||||||
inp.sent = true
|
inp.sent = true
|
||||||
select {
|
select {
|
||||||
case params.Entries <- inp:
|
case params.Entries <- inp:
|
||||||
|
case <-finish:
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Fire off a node specific query
|
// Fire off a node specific query
|
||||||
|
Loading…
Reference in New Issue
Block a user