funky-eyes commented on code in PR #7451: URL: https://github.com/apache/incubator-seata/pull/7451#discussion_r2158228940
########## server/src/main/java/org/apache/seata/server/cluster/manager/ClusterWatcherManager.java: ########## @@ -87,37 +87,38 @@ public void onChangeEvent(ClusterChangeEvent event) { } } - private void notifyWatcher(Watcher<?> watcher) { + private void notifyWatcher(Watcher<HttpContext> watcher) { watcher.setDone(true); sendWatcherResponse(watcher, HttpResponseStatus.OK); } - private void sendWatcherResponse(Watcher<?> watcher, HttpResponseStatus nettyStatus) { - Object context = watcher.getAsyncContext(); + private void sendWatcherResponse(Watcher<HttpContext> watcher, HttpResponseStatus nettyStatus) { + HttpContext context = watcher.getAsyncContext(); if (!(context instanceof HttpContext)) { logger.warn("Unsupported context type for watcher on group {}: {}", watcher.getGroup(), context != null ? context.getClass().getName() : "null"); return; } - HttpContext httpContext = (HttpContext)context; - ChannelHandlerContext ctx = httpContext.getContext(); - if (ctx.channel().isActive()) { - HttpResponse response = - new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, nettyStatus, Unpooled.EMPTY_BUFFER); - response.headers().set(HttpHeaderNames.CONTENT_LENGTH, 0); + ChannelHandlerContext ctx = context.getContext(); + if (!context.isHttp2()) { + if (ctx.channel().isActive()) { + HttpResponse response = Review Comment: https://github.com/apache/incubator-seata/issues/7406 The task of this issue is to add support for HTTP/2. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org