Fixing retry and upload

> I think the issue was that the buffering is broken, it causes overflows on reset

Fair enough. Worth adding a comment so it doesn't get forgotten?