Skip to content

Commit 0e4e200

Browse files
authored
Merge pull request #3775 from ControlSystemStudio/fix_web_socket_transport_error
Do not invoke disconnect callbacks on non-critical web socket transport error
2 parents db6174c + ab0ae77 commit 0e4e200

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/websocket/client/src/main/java/org/phoebus/core/websocket/client/WebSocketClientService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ public void handleException(StompSession session, @Nullable StompCommand command
242242
public void handleTransportError(StompSession session, Throwable exception) {
243243
if (exception instanceof ConnectionLostException) {
244244
logger.log(Level.WARNING, "Connection lost, will attempt to reconnect", exception);
245+
if (disconnectCallback != null) {
246+
disconnectCallback.run();
247+
}
245248
connect();
246249
} else {
247-
logger.log(Level.WARNING, "Handling transport exception", exception);
248-
}
249-
if (disconnectCallback != null) {
250-
disconnectCallback.run();
250+
logger.log(Level.WARNING, "Got transport exception", exception);
251251
}
252252
}
253253
}

0 commit comments

Comments
 (0)