From 6971f4cea1e0693e51a6675fb700987f63f3a6fd Mon Sep 17 00:00:00 2001 From: Jorge Bescos Gascon Date: Wed, 6 Dec 2023 10:09:39 +0100 Subject: [PATCH] Catch Exception Signed-off-by: Jorge Bescos Gascon --- .../glassfish/jersey/media/sse/internal/JerseyEventSink.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media/sse/src/main/java/org/glassfish/jersey/media/sse/internal/JerseyEventSink.java b/media/sse/src/main/java/org/glassfish/jersey/media/sse/internal/JerseyEventSink.java index 184814450d..b1b1dc0e61 100644 --- a/media/sse/src/main/java/org/glassfish/jersey/media/sse/internal/JerseyEventSink.java +++ b/media/sse/src/main/java/org/glassfish/jersey/media/sse/internal/JerseyEventSink.java @@ -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 @@ -139,7 +139,7 @@ public CompletionStage send(OutboundSseEvent event) { try { this.write(event); return CompletableFuture.completedFuture(null); - } catch (IOException e) { + } catch (Exception e) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(e); return future;