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
{{ message }}
This repository has been archived by the owner on May 2, 2023. It is now read-only.
When using AgentSDK.js to connect to LiveEngage server, there was an issue that occurred after the "init" process was started, but the action was frozen.
What's the problem?
The behavior got stuck in the following areas, as I guessed from the our server's logs.
In transport.js, when creating a websocket instance in the code, it was implemented by receiving "open" from the websocket instances and emitting it as it is.
However, due to some effects (e.g., LiveEngage Server failure), there was the case that didn't emit "open" from a websocket instance because of not connected when creating the instance, so that our code was stopped working.
How should you fix this?
I thin it is preferable to use "setTimeout" to force the connection to be dropped if the "open" is not emitted for a certain period of time, and reconnect it.
The text was updated successfully, but these errors were encountered:
tubone24
changed the title
If you don't set the timeout option in websocket instantiating in trasport.js, there is a possibility that It isn't catching "open" at LiveEngage server failure.
There is a possibility that It isn't catching "open" at LiveEngage server failure.
Nov 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Background
When using AgentSDK.js to connect to LiveEngage server, there was an issue that occurred after the "init" process was started, but the action was frozen.
What's the problem?
The behavior got stuck in the following areas, as I guessed from the our server's logs.
https://github.com/LivePersonInc/node-agent-sdk/blob/master/lib/AgentSDK.js#L323
In transport.js, when creating a websocket instance in the code, it was implemented by receiving "open" from the websocket instances and emitting it as it is.
https://github.com/LivePersonInc/node-agent-sdk/blob/master/lib/Transport.js#L62
However, due to some effects (e.g., LiveEngage Server failure), there was the case that didn't emit "open" from a websocket instance because of not connected when creating the instance, so that our code was stopped working.
How should you fix this?
I thin it is preferable to use "setTimeout" to force the connection to be dropped if the "open" is not emitted for a certain period of time, and reconnect it.
And also I haven't tested it myself yet, but there seems to be a timeout option in Websocket.
(I'm sorry that I haven't checked it properly, so it may be a meaningless option.)
https://github.com/websockets/ws/blob/3d5066a7cad9fe3176002916aeda720a7b5ee419/lib/websocket.js#L470
The text was updated successfully, but these errors were encountered: