Suddenly Disconnecting from the Error

0 votes

I am working with the S2 server, and Player is suddenly disconnected. 

So can you let me know how would I solve this issue. Please see the Image for better explanation.

ScreenShot

 

Thank you

 

asked Apr 4, 2014 in AppWarpS2 by marine.modi (62 points)

1 Answer

0 votes
I was able to reproduce the problem. It happens when the app loses focus. This causes the Update loop to pause and so the application misses keep-alives from the server.

You can try this out to stop the app from pausing when it loses focus by Edit-->Project Settings-->Player-->Resolution and Presentation-->Run In Backgound
answered Apr 5, 2014 by dhruvc (1,099 points)
Hi, Thank you dhruv for passing this valuable information. I would download and let you know if further issue comes with me. Highly Appreciate this help.
Hi Dhruv, I am still facing the same issue. Could you please check again?
You also need to update the server side SDK (AppWarpS2.jar) - download the latest from our site. Sorry I forgot to mention in my earlier response.
Okay Dhruv. I've updated the latest jar files as well as the Unity dlls but still the game is being disconnected.
Followed up offline on this, the issue is resolved after using the latest binaries. However intermittent connection issues will happen when targeting mobile devices for the following reasons

1) User locks the phone or presses the home screen to put the app in background
2) The device looses its 3G/cellular connectivity or switches between WiFi/Cellular sources.

The way to handle this is to have the application connect again automatically or ask the user to manually connect to multiplayer once it has internet connectivity.

You can also look in to the connection resiliency feature.
http://appwarps2.shephertz.com/dev-center/connection-resiliency/
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...