Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Know if connection status is connected at first #124

Open
facundocoto opened this issue Jun 14, 2018 · 1 comment
Open

Know if connection status is connected at first #124

facundocoto opened this issue Jun 14, 2018 · 1 comment

Comments

@facundocoto
Copy link

Hi, how know was successfull? Seems like the statusconnections only returns when the connections failure or is reconnecting. But I want to know if cnnection status is 'connected' at first time to try connections.

Thanks

@alberthoekstra
Copy link

I think you subscribe ‘to late’ to the status changes.

If you inject the signalrR service into your component or whatsoever you probably use something like this.signalr.connect(); and then subscribe to the status changes.

Then you could miss the connecting and connected state change.

You should do this.signalr.createConnection();, Save the result, subscribe to the state changes, start the connection you received from the createConnection method.

Can’t create code blocks because I’m on phone. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants