Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4765#discussion_r142666553
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/util/HandlerUtils.java
---
@@ -108,19 +108,25 @@ public static void sendErrorResponse(
* @param httpRequest originating http request
* @param message which should be sent
* @param statusCode of the message to send
+ * @param forceClose indicates whether to forcibly close the connection
after the response is sent
*/
public static void sendResponse(
@Nonnull ChannelHandlerContext channelHandlerContext,
@Nonnull HttpRequest httpRequest,
@Nonnull String message,
- @Nonnull HttpResponseStatus statusCode) {
+ @Nonnull HttpResponseStatus statusCode,
+ boolean forceClose) {
--- End diff --
Would it make sense to not pass forceClose explicitly but to decide this
based on `statusCode` and `isServerError` inside of this method?
---