Closed ppettit-smartling closed 3 months ago
FAPI takes 140-170 sec to prepare file. The current timeout is 120 sec (https://github.com/Smartling/api-sdk-go/commit/9321c7d1b3e45071578fae05c9875ef5335f5d24). It's time to refactor code and move timeout configuration from SDK to application.
DoD:
I removed Timeout from DefaultHTTPClient in api-sdk-go. Upgraded dependencies, including api-sdk-go. It fixes the issue with file download.
User receives the following error intermittently when attempting to pull down localized files:
[ERROR] unable to write file contents into "en.xcloc/Localized Contents/en_th-TH.xliff" -- context deadline exceeded (Client.Timeout or context cancellation while reading body)
On retries file can be downloaded as expected.
Possibly related to IO Go Lang error here: https://golang.org/src/net/http/client.go?s=6511:6572