Sign In Register

How can we help you today?

Start a new topic
Answered

Failed Request - non durable

What's the best practice for retrying a request without using the durable function?  If the client is closed and then reopened I don't want it to send these requests at a later time.  


I would like to retry a number of times and then handle the error if after n tries the request still fail and the client needs to handle that.  Do I need to write a custom retry handler?


https://support.gamesparks.net/support/discussions/topics/1000044588


Best Answer

Hey Kevin,

If you are using Unity, then the durable requests will take care of this for you.
They will only be sent when GameSparks gets a connection to the server, not when the app is unpaused or suspended.
So durable request wont try to send and fail because the app is reopened.

Does that make sense?
Let me know if i am misunderstanding

Thanks,
Sean


Answer

Hey Kevin,

If you are using Unity, then the durable requests will take care of this for you.
They will only be sent when GameSparks gets a connection to the server, not when the app is unpaused or suspended.
So durable request wont try to send and fail because the app is reopened.

Does that make sense?
Let me know if i am misunderstanding

Thanks,
Sean

Just to clarify.  Let's say we have not lost connection from the gamesparks server, but the request has failed.  Maybe a slow connection or the request just timed out.  I should still use the durable request?


The documentation seems to suggest it will retry once the user is re-authenticated, but not necessarily if the request timed out for other reasons.  

yes, in this case a durable request will still work once you establish a connection again.

 

Login to post a comment