فهرست منبع

tech(tsdb): abort batch procces when context closes

bergquist 9 سال پیش
والد
کامیت
5a201cfd35
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  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()
 		}
 	}