Browse Source

tech(tsdb): abort batch procces when context closes

bergquist 9 years ago
parent
commit
5a201cfd35
1 changed files with 2 additions and 0 deletions
  1. 2 0
      pkg/tsdb/request.go

+ 2 - 0
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()
 		}
 	}