From 26e66ed1c596a17e57403f66942addde7ee07c63 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 1 Sep 2017 09:53:09 -0700 Subject: [PATCH] fix checking of context error --- nomad/rpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/rpc.go b/nomad/rpc.go index 5cbd82226..b3bb2895d 100644 --- a/nomad/rpc.go +++ b/nomad/rpc.go @@ -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 } }