Closed nicubularda closed 3 years ago
@nicubularda can you share the complete stack trace, and also the version used?
I see this issue in version 3.0.6 when I set maxReconnectOnClose: 0
and then kill the server.
Uncaught ReferenceError: message is not defined
at _reconnectWebSocket (atmosphere.js:1747)
at WebSocket._websocket.onclose (atmosphere.js:1564)
Seems to be caused by line atmosphere-3.0.6.js:1749
atmosphere.util.warn("Websocket error, reason: " + message.reason);
This code was probably moved here from somewhere else. The message
variable is not defined in this scope.
@ivan-lattak Can you do a pull request? I will merge and release. Thanks
I also stumbled upon the same javascript warning when shutting down the server. Caused at: https://github.com/Atmosphere/atmosphere-javascript/blob/2aeccb6c6afece69c664c95c7e66b3693ab8ec26/modules/javascript/src/main/webapp/javascript/atmosphere.js#L1751
Hence in 3.1.0 we have the same issue.
If setting logLevel to "warn" when the Websocket reconnect maximum try was reached you will get into the "message is not defined" error.