gold: Stop trying to write in a loop when a write has failed.
gold: Stop trying to write in a loop when a write has failed.

BUG=skia:
TBR=stephana

Review URL: https://codereview.chromium.org/1162273003

Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot