Skip to content

Commit 8c5fc32

Browse files
committed
fix code
1 parent 57bf649 commit 8c5fc32

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

fluss-kafka/src/main/java/com/alibaba/fluss/kafka/KafkaRequestHandler.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
import com.alibaba.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext;
1919
import lombok.extern.slf4j.Slf4j;
2020
import org.apache.kafka.common.errors.LeaderNotAvailableException;
21-
import org.apache.kafka.common.requests.AbstractRequest;
22-
import org.apache.kafka.common.requests.AbstractResponse;
23-
24-
import java.util.concurrent.CompletableFuture;
2521

2622
@Slf4j
2723
public final class KafkaRequestHandler extends KafkaCommandDecoder {
@@ -48,10 +44,8 @@ protected void close() {
4844

4945
@Override
5046
protected void handleInactive(KafkaRequest request) {
51-
AbstractRequest req = request.request();
5247
log.warn("Received a request on an inactive channel: {}", remoteAddress);
53-
AbstractResponse response = req.getErrorResponse(new LeaderNotAvailableException("Channel is not ready"));
54-
request.complete(response);
48+
request.fail(new LeaderNotAvailableException("Channel is inactive"));
5549
}
5650

5751
@Override

0 commit comments

Comments
 (0)