add retry_connection(f) decorator for retrying if connection problems exists