Hi all,
I am currently testing the HRC silent reconnection and I noticed that if the reconnection fails, in like 10% of cases I will not receive a CONNECTION_LOST event. I am testing on Android with Adobe Air and Smartfox client library 1.2.5 against Smartfoxserver 2.9.2 as follows:
- Silent reconnection param set to 10 seconds
- Start app on Android and connect to Smartfox with Wifi connection on
- Minimize app and close Wifi
- Resume app
- SFSEvent.CONNECTION_RETRY is fired
- waiting
- In some cases, neither SFSEvent.CONNECTION_RESUME or SFSEvent.CONNECTION_LOST is fired
Am I missing something or is this a potential bug in the library? This is currently a medium issue in our app because the app will show a "reconnecting.." popup and then the app will stop responding.
Thanks,
Ruben
Silent Reconnection fails silently
Re: Silent Reconnection fails silently
Switching the Wifi is crapshoot, similar to unplugging the ethernet cord... we don't recommend it, but of course is another scenario that developers might want to handle.
Here we describe how to test HRC+:
http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
Anyways to reply to your post:
Is the Wifi resumed within 10 seconds? It's not explained in the flow.
If you're switching between Wifi and 3G it's expected that it may not work. TCP was designed 40 years ago without mobility in mind and we're stuck with this technology. The SFS2X API simply react to the underlying TCP events. If no signal bubbles up, we cannot react
If you test this scenario on a PC you will get a totally different effect because you're running a different OS with a different TCP stack.
There's not much more we can do about it. The HRC+ can help re-establishing a lost connection under different circumstances but it's not a silver bullet, nor it can overcome the shortcomings of the transport protocol.
Switching between networks (such as Wifi --> 3G/4G and viceversa) could be handled separately by listening to the OS specific events (does AIR provide notifications?) and re-creating a new connection.
hope it helps
Here we describe how to test HRC+:
http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
Anyways to reply to your post:
Is the Wifi resumed within 10 seconds? It's not explained in the flow.
If you're switching between Wifi and 3G it's expected that it may not work. TCP was designed 40 years ago without mobility in mind and we're stuck with this technology. The SFS2X API simply react to the underlying TCP events. If no signal bubbles up, we cannot react
If you test this scenario on a PC you will get a totally different effect because you're running a different OS with a different TCP stack.
There's not much more we can do about it. The HRC+ can help re-establishing a lost connection under different circumstances but it's not a silver bullet, nor it can overcome the shortcomings of the transport protocol.
Switching between networks (such as Wifi --> 3G/4G and viceversa) could be handled separately by listening to the OS specific events (does AIR provide notifications?) and re-creating a new connection.
hope it helps
Re: Silent Reconnection fails silently
Hi Lapo,
thanks for the clarification. I have seen the similar behavior (reconnecting popup never closing after reconnection attempt) in different scenarios, but switching off the Wifi was a good way to reproduce it. I will discontinue the use of HRC then, as our regular reconnection flow is very stable.
Thanks!
thanks for the clarification. I have seen the similar behavior (reconnecting popup never closing after reconnection attempt) in different scenarios, but switching off the Wifi was a good way to reproduce it. I will discontinue the use of HRC then, as our regular reconnection flow is very stable.
Thanks!
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 39 guests