LivePersonInc / node-agent-sdk

LivePerson Agent Messaging SDK for NodeJS
MIT License
49 stars 79 forks source link

In version 1.4.x, WebSocket is closed by each refreshSession! #134

Open ShigeruNakagaki opened 3 years ago

ShigeruNakagaki commented 3 years ago

before version 1.4.x, WebSocket is not closed by refreshSession. but in version 1.4.x, In version 1.4.x, WebSocket is closed by each refreshSession! If refreshSessionInterval is 10 minutes, WebSocket will be closed at each 10 minutes. And We need to reconnect each 10 minutes. This is an awful degrade bug.

map34 commented 3 years ago

Hi @ShigeruNakagaki, could you let us know what your account number is?

ShigeruNakagaki commented 3 years ago

Hi, map34. I don't want to talk about our account here. We have already explained this to Live Person Japan. However, they did not understand what is a problem.

ShigeruNakagaki commented 3 years ago

Hi, map34

I wasn't accurate. v1.3.2 is OK. but 1.4.x is not ok.

ShigeruNakagaki commented 3 years ago

Well, I'm checking each version now.

v 1.3.2 is OK. v 1.4.0 received 401 error at refresh timing and this is not ok. v 1.4.1 received 401 error at refresh timing and WebSocket was closed. this is so wrong.

ShigeruNakagaki commented 3 years ago

this fix is so wrong. https://github.com/LivePersonInc/node-agent-sdk/blob/b4c2a7e421d3b61cfd0595453527f7090220133a/lib/AgentSDK.js#L218

please, do not reconnect when it received 401 at refreshing session. What is wrong is to receive 401 at refreshing session. it should be refresh session without 401 response.

thanks

ShigeruNakagaki commented 3 years ago

Every single refreshSession receives 401 response. Don't you think this itself is wrong?