Raven-js limit of retries?

We have an application that sometimes is offline and in case of error it is trying to report to Sentry but fails on getting dns or connection. In this case it is retrying like 1000+ times. Is there a way to limit number of retries?