off-topic ; you could try fixing the underlying error by use of timeBetweenReconnectMillis parameter
timeBetweenReconnectMillis