ringcentral / ringcentral-extensible

RingCentral Extensible SDK
10 stars 6 forks source link

Update wsTokenExpiresAt logic #77

Closed tylerlong closed 1 year ago

tylerlong commented 1 year ago

Because the expires_in by default is 600 seconds (10 minutes).

-10 is too small to cover network slowness. I changed it to * 0.8.

I made this change due to a recent ws-token expired issue. Just to make sure that we never use a expired ws token to connect to WS server.

I also removed if (this.wsToken) {, becuase it is always true.