Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] backport of the #5490 #5493

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -19,6 +19,7 @@
import java.io.Closeable;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UncheckedIOException;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.concurrent.BlockingDeque;
Expand Down Expand Up @@ -255,11 +256,11 @@ public Void call() throws IOException {
// if MBW replaced the stream, let's make sure to set it in the response context.
responseContext.setEntityStream(writtenStream);
}
} catch (final IOException ioe) {
} catch (final IOException | UncheckedIOException ioe) {
connectionCallback.onDisconnect(asyncContext);
throw ioe;
} catch (final MappableException mpe) {
if (mpe.getCause() instanceof IOException) {
if (mpe.getCause() instanceof IOException || mpe.getCause() instanceof UncheckedIOException) {
connectionCallback.onDisconnect(asyncContext);
}
throw mpe;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -139,7 +139,7 @@ public CompletionStage<?> send(OutboundSseEvent event) {
try {
this.write(event);
return CompletableFuture.completedFuture(null);
} catch (IOException e) {
} catch (Exception e) {
CompletableFuture<Void> future = new CompletableFuture<>();
future.completeExceptionally(e);
return future;
Expand Down