Sequence of onConnectionRetry and onConnectionLost

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Sequence of onConnectionRetry and onConnectionLost

Postby clam61 » 12 Jul 2014, 04:52

According to the docs, once a disconnect happens, onConnectionRetry gets fired. If the reconnect fails, then onConnectionLost occurs.

In my experience with the iOS, and Java API's, onConnectionRetry and onConnectionLost happens at the same time.

Am I doing something wrong in initializing the API?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Sequence of onConnectionRetry and onConnectionLost

Postby Lapo » 12 Jul 2014, 07:53

Literally "at the same time" is unlikely. Since there's only one thread disptaching events one of them must happen first and the other later.

In any case no, this doesn't appear normal, but you haven't given us the details about which API specifically and which version.

Also it wouldn't hurt to know what's the setting for the "Reconnection Time" on the server side and how the disconnection is tested? Locally? Online? And in which way?
Lapo
--
gotoAndPlay()
...addicted to flash games
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: Sequence of onConnectionRetry and onConnectionLost

Postby clam61 » 12 Jul 2014, 19:38

Sorry, Lapo. You are right, "At the same time" is incorrect.

It would be more appropriate to say that I saw an occurrence where onConnectionRetry was called, onConnectionLost was called, and then onConnectionResume was called. Actually looking at my records now, I see this occurred with the Java client API.

Perhaps I should move this thread to the Java section? For iOS I have a different issue.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Sequence of onConnectionRetry and onConnectionLost

Postby Lapo » 14 Jul 2014, 08:53

Yes, it would be better to post in the Java section. If it's just one occurrence, however, it may be due by a temporary issue on your side. If you can reproduce it at will please post the sequence of steps to recreate it.

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 17 guests