centrifugal / centrifuge-js

JavaScript client SDK to communicate with Centrifugo and Centrifuge-based server from browser, NodeJS and React Native. Supports WebSocket, HTTP-streaming over Fetch and Readable Stream API, EventSource, WebTransport.
https://centrifugal.dev
MIT License
411 stars 104 forks source link

Skipped events with getToken function #287

Closed anastasia-anisimova closed 5 months ago

anastasia-anisimova commented 5 months ago

Is your feature request related to a problem? Please describe. Hi! When calling getToken function, what happened with centrifuge events? We skipped it? (because getting a new token can take a few seconds)

FZambia commented 5 months ago

Hello @anastasia-anisimova

When calling getToken function, what happened with centrifuge events? We skipped it?

Processing events and getToken do not depend on each other. While getToken is called events are processed because getToken executed asynchronously.