Hi.
I uploaded simple example -
http://rapidshare.com/files/353208371/Test.rar.htmlIn this test app I start to connect RtcHTTPClient to unavailable address. All RtcHTTPClient.Reconnect options sets to True.
Problem: I can't normally disconnect RtcHTTPClient when I notice that server address is unavailable.
I found 2 ways for disconnecting:
1. Simply call Disconnect. In this case RtcHTTPClient continues reconnects. Here is an application log:
Connect clicked
ConnectFail
Reconnect
Disconnect 1 clicked <<===== I pressed "Disconnect 1" button
ConnectFail <<===== this event triggered right after "Disconnect 1" button pressing
Reconnect
ConnectFail
Reconnect
ConnectFail
... <<===== reconnects are proceed...
2. Before call Disconnect I set all RtcHTTPClient.Reconnect options to False. In this case I found 2 variants:
2.1. I press "Disconnect 2" button after Reconnect trigger. All is ended well, RtcHTTPClient stops attempts to connect to unavailable address. Here is an application log:
Connect clicked
ConnectFail
Reconnect
ConnectFail
Reconnect
Disconnect 2 clicked <<===== I pressed "Disconnect 2" button
ConnectFail <<===== this event triggered right after "Disconnect 2" button pressing
<no more events>
2.2. I press "Disconnect 2" button after ConnectFail trigger. In this case RtcHTTPClient tries one more reconnect and then finished. Here is an application log:
Connect clicked
ConnectFail
Reconnect
ConnectFail
Disconnect 2 clicked <<===== I pressed "Disconnect 2" button
Reconnect <<===== this event triggered after real RtcHTTPClient.Reconnect.Wait timeout
ConnectFail
<no more events>
I think case 1 isn't intuitively clear behavior, because RtcHTTPClient should stops all reconnect attempts after manual Disconnect call. And case 2.2 is a bug, because in real applications I call Dicsonnect method after ConnectFail event trigger, but RtcHTTPClient tries one more reconnect.
Or RtcHTTPClient has alternative method for disconnecting? Though, in really, in this case we talk not about disconnecting (because RtcHTTPClient.isConnected is False), but about an operation stop.