From 5a201cfd35b735d1d50513fe680462b3ba6aeac0 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 3 Oct 2016 14:33:47 +0200 Subject: [PATCH] tech(tsdb): abort batch procces when context closes --- pkg/tsdb/request.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tsdb/request.go b/pkg/tsdb/request.go index 88c6eb81eac..2934443bc53 100644 --- a/pkg/tsdb/request.go +++ b/pkg/tsdb/request.go @@ -51,6 +51,8 @@ func HandleRequest(ctx context.Context, req *Request) (*Response, error) { go batch.process(ctx, context) } } + case <-ctx.Done(): + return nil, ctx.Err() } }