Merge pull request #3 from mjgarton/allowExitWhenCallerDoesntConsume

Allow timeout to complete
This commit is contained in:
Asim Aslam 2016-09-29 08:00:07 +01:00 committed by GitHub
commit 4725bf05ee

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