flutter_janus_client icon indicating copy to clipboard operation
flutter_janus_client copied to clipboard

reconnect after lost connection

Open Nightwelf opened this issue 3 years ago • 8 comments

Hi! I need reconnect to all text rooms after lost connection or after connection was refused. Please. help. How i can do it?

Nightwelf avatar Jul 19 '22 12:07 Nightwelf

For this you can use connectivity package to see if connectionstate got disconnected in that event you can use saved user info to connect user back to room if connection is back on, i hope this solves your issue Closing for now you can reopen if you find bug in package itself

shivanshtalwar0 avatar Jul 19 '22 16:07 shivanshtalwar0

after reconnect i must dispose all?

Nightwelf avatar Jul 19 '22 16:07 Nightwelf

Well it would be better idea to recreate new session instance and then attach the plugin on it to make sure everything is working as expected

shivanshtalwar0 avatar Jul 19 '22 16:07 shivanshtalwar0

You know what i will add it in my todo list using connectivity package and add auto reconnect in the event of disconnected network state

shivanshtalwar0 avatar Jul 19 '22 16:07 shivanshtalwar0

For the time being you can use the approach i told you

shivanshtalwar0 avatar Jul 19 '22 16:07 shivanshtalwar0

very often the socket crashes on its own. what to do in this case? while my server is working properly. the socket may just fall

Nightwelf avatar Jul 19 '22 16:07 Nightwelf

I don't believe it would crash on its own unless network state has been changed

shivanshtalwar0 avatar Jul 19 '22 16:07 shivanshtalwar0

Maybe it's my mistake. I try to research. Thanks!

Nightwelf avatar Jul 19 '22 17:07 Nightwelf

closing as it is not planned, it is not that urgent anyway maybe i will revisit it as an enhancement in future

shivanshtalwar0 avatar Jan 29 '24 00:01 shivanshtalwar0