Ask a Question
microservice timeout exceptions
Hello,
In my client code I use try/catch blocks around the microservice calls and when i get a timeout exception I have the code wait a couple seconds and retry the request.
However, it seems, like the Manual says, even though the request times-out, the microservice still runs its code to completion.
So my player calls this microservice to Deduct 100 currency and waits for a true/false response confirmation, but has a timeout exception and the code re-calls the Deduct currency again and has now lost 200 currency.
Am I supposed to put Context.IsCancelled checks after each 'await' call in the microservice to see if it happened to timeout yet and then have the microservice rollback any changes in anticipation that the Client is going to call again after the timeout period?