From 55556b0714c1f35a72cfef0f4650b90ae2736660 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Tue, 21 Mar 2023 19:20:29 +0100 Subject: [PATCH] Handle CompletionException in websocket client --- .../main/java/fr/pandacube/lib/ws/client/AbstractClientWS.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandalib-ws-client/src/main/java/fr/pandacube/lib/ws/client/AbstractClientWS.java b/pandalib-ws-client/src/main/java/fr/pandacube/lib/ws/client/AbstractClientWS.java index ce300d5..5f50724 100644 --- a/pandalib-ws-client/src/main/java/fr/pandacube/lib/ws/client/AbstractClientWS.java +++ b/pandalib-ws-client/src/main/java/fr/pandacube/lib/ws/client/AbstractClientWS.java @@ -129,6 +129,8 @@ public abstract class AbstractClientWS implements AbstractWS { return; } } + if (ex instanceof CompletionException) + ex = ex.getCause(); if (ex instanceof IOException) { reconnectIfNecessary(); }