You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Utils.webSocketMessage(r) is used to avoid adding listerners to the AtmosphereResource associated with every websocket message. So what needs to be done here is if the client's heartbeat is enabled, then this condition should be skipped. If the client doesn't send heartbeat, then we need to leave the code as it is so we no listener ot processing are done on the AtmosphereResource. Does it help?
a015c69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfarcand this breaks detection when client sends heartbeat: https://github.com/Atmosphere/atmosphere-javascript/blob/master/modules/javascript/src/main/webapp/javascript/atmosphere.js#L1493
Didn't really get what's the logic of 'Utils.webSocketMessage(r)' (which return true when heartbeat is sent). Can you help fix this?
a015c69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utils.webSocketMessage(r)
is used to avoid adding listerners to the AtmosphereResource associated with every websocket message. So what needs to be done here is if the client's heartbeat is enabled, then this condition should be skipped. If the client doesn't send heartbeat, then we need to leave the code as it is so we no listener ot processing are done on the AtmosphereResource. Does it help?a015c69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok perfect I understand :-)