From eac8a01946f0cc615d3fafb7e8fae44ca1e9bbbc Mon Sep 17 00:00:00 2001 From: SuperPat <7791600+SuperPat45@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:04:18 +0100 Subject: [PATCH] onclose callback not called when connexion close by timeout onclose callback not called when connexion close by timeout --- modules/javascript/src/main/webapp/javascript/atmosphere.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/javascript/src/main/webapp/javascript/atmosphere.js b/modules/javascript/src/main/webapp/javascript/atmosphere.js index 1290d90..e678d3a 100644 --- a/modules/javascript/src/main/webapp/javascript/atmosphere.js +++ b/modules/javascript/src/main/webapp/javascript/atmosphere.js @@ -1568,6 +1568,8 @@ atmosphere.util.warn("Websocket closed, reason: " + reason + ' - wasClean: ' + message.wasClean); } + _invokeClose(webSocketOpened); + if (_response.closedByClientTimeout || (_request.handleOnlineOffline && offline)) { // IFF online/offline events are handled and we happen to be offline, we stop all reconnect attempts and // resume them in the "online" event (if we get here in that case, something else went wrong as the @@ -1582,8 +1584,6 @@ return; } - _invokeClose(webSocketOpened); - _response.state = 'closed'; if (_abortingConnection) {