From ae634ab5604a1a0e6ee8d79c8e46b7bacf34e9e5 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Tue, 15 Aug 2023 00:57:49 +0200 Subject: [PATCH] Better handling of IOException on client websocket when trying to send a payload. --- .../java/fr/pandacube/lib/ws/client/AbstractClientWS.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 bff3134..c5d54b4 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 @@ -173,10 +173,7 @@ public abstract class AbstractClientWS implements AbstractWS { throw ThrowableUtil.uncheck(ce.getCause(), false); } } catch (IOException ioe) { - synchronized (socket) { - socket.set(null); - reconnectIfNecessary(); - } + receiveListener.onError(socket.get(), ioe); throw ioe; }