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:
Martin Garton 2016-09-28 20:27:32 +01:00
parent ab413e42fe
commit bf498197cb

View File

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