fix checking of context error

This commit is contained in:
Alex Dadgar 2017-09-01 09:53:09 -07:00
parent 4cc8bac48d
commit 26e66ed1c5

View file

@ -397,7 +397,7 @@ RUN_QUERY:
// Check for minimum query time
if err == nil && opts.queryOpts.MinQueryIndex > 0 && opts.queryMeta.Index <= opts.queryOpts.MinQueryIndex {
if expired := ws.WatchCtx(ctx); !expired {
if err := ws.WatchCtx(ctx); err == nil {
goto RUN_QUERY
}
}