Skip to content

Commit

Permalink
Fix http3 negotiation failed (apache#14901)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxsean authored Nov 20, 2024
1 parent 9eb80d9 commit 27c51c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
5 changes: 0 additions & 5 deletions dubbo-distribution/dubbo-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,6 @@
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public CompletableFuture<String> start(URL url) {
CompletableFuture<String> future = new CompletableFuture<>();
try {
Channel channel = connectionClient.getChannel(true);
if (channel == null) {
future.completeExceptionally(new IllegalStateException("Channel is null"));
return future;
}
Http2StreamChannelBootstrap bootstrap = new Http2StreamChannelBootstrap(channel);
bootstrap.handler(new ChannelInboundHandlerAdapter() {
@Override
Expand Down Expand Up @@ -112,9 +116,6 @@ private static final class Listener implements H2TransportListener {

@Override
public void onHeader(Http2Headers headers, boolean endStream) {
if (endStream) {
return;
}
CharSequence line = headers.status();
if (line != null) {
HttpResponseStatus status = HttpResponseStatus.parseLine(line);
Expand All @@ -124,6 +125,9 @@ public void onHeader(Http2Headers headers, boolean endStream) {
return;
}
}
if (endStream) {
return;
}
executor.execute(() -> future.completeExceptionally(new RuntimeException("Status: " + line)));
}

Expand Down
5 changes: 0 additions & 5 deletions dubbo-test/dubbo-dependencies-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,6 @@
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure-compatible</artifactId>
Expand Down

0 comments on commit 27c51c3

Please sign in to comment.