Retry pullfinish with empty payload if call fails

If the first call for pullFinished fails, it is likely because the
transaction is too large. Currently, if this happens statsd will just
sleep until the timeout. With this change, the client will retry calling
pullFinish if the first attempt fails, but with an empty payload (and
with success = false) to cause the puller to fail fast, and so statsd
does not wait for the timeout.

Test: atest GtsStatsdHostTestCases
Bug: 157768117
Change-Id: I1af29b6c83039ab56ef847832a600d4afea34000
1 file changed
tree: 91e70222120c1c711adc27dfc5ceb4469dd24a6c
  1. apex/