Is $A$ necessarily a compact set or a connected set? Let $f:\mathbb R\to \mathbb R$ be a continuous function and $A\subset \mathbb R$ is defined by :

$A=\{y\in \mathbb R:y=\lim f(x_n),$ for some sequence $x_n\to \infty\}$

Is $A$ necessarily  a compact set or a connected set?
My try:
Since $f$ is continuous and $x_n\to \infty$ so either $f(x_n)\to \infty $ or $f(x_n)\to -\infty$ .Hence $A$ is finite and compact but the answer is given to be connected. Where am I wrong?

Adding to Alan's answer: to show that it is connected, prove that it is an interval.
Let $x,y \in A$ with $x \le y$, and let $z \in [x,y]$. Then, $\exists 0\le a \le 1$, such that $z = ax + (1-a)y$. Let $(x_n)$ be the one associated to $x$ and $(y_n)$ be that associated to $y$. 
Now put $u_n = af(x_n) +(1-a)f(y_n)$. Then, by IVT, for each $n \in \mathbb N$, $\exists z_n \in [x_n, y_n]$ or $[y_n, x_n]$ such that $u_n = f(z_n)$. 
Therefore, $z_n \to \infty$ and $f(z_n) \to z$, so $z \in A$.
