Jump to content

javascript api session.eventHub.connect() is not async


lastmatador

Recommended Posts

Hi, everyone, it's so strange that i can't wait until eventHub fully connected. For example for Session - you have session.initializing that i can await for to garatee that i have ready to work session.
If i write something like this:

console.log(session.eventHub.isConnected())
session.eventHub.connect()
console.log(session.eventHub.isConnected())

it shows me false, false.
and because of this function is not async and is not returning a promise, i can't await of it.
session.eventHub.disconnect() behaves in a similar way.

It causes many problems when I need to connect-disconnect several times in a row. Please help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...