Recent changes have been made:
1) Error handler is called immediately.
2) n-1 retries (where n is _retryIntervals.length) are attempted then the status is changed to offline (pollStatusHandler is called)
3) We continue to poll at _retryIntervals(_retryIntervals - 1) interval while we are offline.
4) When we are online pollStatusHandler is called again.
A patch, which implements the idea.