user disconnected,But [smartFox isConnected] is true

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

Moderators: Lapo, Bax

scofy
Posts: 79
Joined: 08 Apr 2012, 09:04

user disconnected,But [smartFox isConnected] is true

Postby scofy » 06 Apr 2013, 02:44

When i connect one address and login in zone success then disconnect it and connect to another ip,logs show "Already connected",I force to use [smartfox killconnection] disconnect the first connection again in order to create a new connection. Here are logs:
2013-04-06 10:24:01.929 iGame[3438:c07] disconnectServer ip = *.*.*.*,zone = MasterServer
2013-04-06 10:24:02.042 iGame[3438:c07] onConnectionLost
2013-04-06 10:24:02.043 iGame[3438:c07] Connection was lost, Reason:manual
2013-04-06 10:24:02.043 iGame[3438:c07] [SFS - WARN]Already connected!

sfs2x 2.4.0 and ios api 1.1.5.
scofy
Posts: 79
Joined: 08 Apr 2012, 09:04

Re: user disconnected,But [smartFox isConnected] is true

Postby scofy » 06 Apr 2013, 02:48

I've never met this kind of problem when I use the version 1.1.3 api.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: user disconnected,But [smartFox isConnected] is true

Postby Lapo » 06 Apr 2013, 11:43

Once you loose connection your previous Session is gone. In order to start a new Session just re-create the SmartFox2XClient class.
Before you do that just make sure to release the old object, unless you're using ARC.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
scofy
Posts: 79
Joined: 08 Apr 2012, 09:04

Re: user disconnected,But [smartFox isConnected] is true

Postby scofy » 07 Apr 2013, 15:22

Lapo wrote:Once you loose connection your previous Session is gone. In order to start a new Session just re-create the SmartFox2XClient class.
Before you do that just make sure to release the old object, unless you're using ARC.

Thanks

Thanks for Lapo,it works fine!
jianchic
Posts: 25
Joined: 08 Apr 2012, 16:38

Re: user disconnected,But [smartFox isConnected] is true

Postby jianchic » 01 Aug 2013, 08:06

Lapo wrote:Once you loose connection your previous Session is gone. In order to start a new Session just re-create the SmartFox2XClient class.
Before you do that just make sure to release the old object, unless you're using ARC.

Thanks


i'm using ARC if i re-create the SmartFox2XClient class i got a terrible memory leak!
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: user disconnected,But [smartFox isConnected] is true

Postby Lapo » 01 Aug 2013, 16:01

Hi,
yes we are aware of the problem and working on a solution, possibly migrating the API to ARC-only.
We're releasing a new version in a few days with several new fixes and then the next one will address the ARC problem.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
jianchic
Posts: 25
Joined: 08 Apr 2012, 16:38

Re: user disconnected,But [smartFox isConnected] is true

Postby jianchic » 03 Aug 2013, 05:45

Lapo wrote:Hi,
yes we are aware of the problem and working on a solution, possibly migrating the API to ARC-only.
We're releasing a new version in a few days with several new fixes and then the next one will address the ARC problem.

Thanks



i really don't like your iOS code, but my as3 project is using sfs, so i can't change it . i have to write many categories to release your objects, i told you a few month ago, but your didn't solve this problem until now!

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 28 guests