Fix crash on exhaustion of server retry attempts