If there is a race condition going on that leaves us with a too small buffer after the first attempt, maybe we should just return an error and let the calling code handle it? They can decide to retry or not...