This is the sequel to compact convergence on a non-compact metric space implies continuity.
$\textbf{Proposition: }$Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces. Let $\{f_n\}_{n\in\mathbb{N}}$ be a sequence of continuous functions from $X$ to $Y$ which is pointwise convergent to some $f:X\to Y$. If $X$ is not compact, but the convergence $f_n \to f$ is uniform on every compact subset of $X$, then $f$ is continuous.
$\textbf{Proof:}$ We know that if the convergence $f_n\to f$ is uniform on $K\subset X$, then $f$ is continuous on $K$.
Choose $a\in X$. We will prove that $f$ is continuous in $a$. Since $\{a\}$ is a compact set of $X$, the convergence $f_n\to f$ is uniform on this set. Hence $f$ must be continuous in $a$.
This proof seems too easy to be true, yet it is completely the same as compact convergence on a non-compact metric space implies continuity. Is this wrong?