Sign In Register

How can we help you today?

Start a new topic
Answered

Checking network connection before sending requests

Hello,


We use ActionScript SDK.


We spotted that if GS connects and network connection is lost after that, sending requests doesn't report anything. We have set setTimeoutSeconds(5).


The lost requests might cause a lot of problems for us. If there'll be failed response, we will postpone data submit, but when there's no any response, the handler wont get anything and the data to submit will be lost.



POSSIBLE SOLUTION 1


The solution might be if we build connection checker and run it before any request sent from GS. Checker should connect to our webserver and get some data from it to ensure that it wasn't some redirect website (e.g. hotels wifi screen and etc.).


This might be a solution, but checking connection with URL another than GS might add other problems - Maybe there might be no problem connecting with our website and something might bock connection with GS, or our webserver might have downtime.


POSSIBLE SOLUTION 2


I tested that if connect is called before every request, it detects if connection is lost and returns false in availabilityCallback. I don't think that it might be a good solution. Calling connect before every request might mess up the server statistics or cause any other problems. This method is not dedicated for this type of usage. I don't know. Would it be good if we use it?


POSSIBLE SOLUTION 3


Add another timeOut checker to every request and if it GS doesn't return anything after 1 second more than GS request timeOut is, then report that there's connection problem with GS. This is a workaround and it's a worst solution. I think you will agree.


POSSIBLE SOLUTION 4


I think the best way might be if GS SDK will have it's own connection checker, which checks connection to GS server before every request.



I will be glad if someone can provide a better solution. 


Thanks,

Irakli


Best Answer

Hi Oisin,


Yes. I have submitted a ticket with link to this issue. There was a bug in SDK and we fixed it. It should be already fixed in the repository also.


Thanks,

Irakli


Hi Irakli,

Sorry we missed this one.
Did you find a solution to this issue?

Thanks,

Oisin

Answer

Hi Oisin,


Yes. I have submitted a ticket with link to this issue. There was a bug in SDK and we fixed it. It should be already fixed in the repository also.


Thanks,

Irakli

Login to post a comment