Show $\Omega$ is simply connected if every harmonic function has a conjugate

Prove: If every harmonic function on $\Omega$ has a harmonic conjugate on $\Omega$, then $\Omega$ is simply connected.

Same question is asked here but no proof is presented: is the converse true: in a simply connected domain every harmonic function has its conjugate

Any idea?

Solutions Collecting From Web of "Show $\Omega$ is simply connected if every harmonic function has a conjugate"

We prove the contrapositive: If $\Omega$ is not simply connected, there is a real harmonic function on $\Omega$ that doesn’t have a harmonic conjugate.

Since $\Omega$ is by assumption not simply connected, there is a $w \in \mathbb{C}\setminus\Omega$ such that there is a closed piecewise differentiable curve $\gamma$ in $\Omega$ with nonzero winding number around $w$.

Then let

$$u(z) = \log \lvert z-w\rvert.$$

Since $w \notin\Omega$, $\lvert z-w\rvert > 0$ for all $z\in\Omega$, so $u$ is well-defined. Locally, $u$ is the real part of a holomorphic function, hence it is harmonic (that can also be verified by differentiation).

But $u$ has no harmonic conjugate. For if it had a harmonic conjugate $v$, then $f = u+iv$ would be a holomorphic function, and since $u$ is locally the real part of a branch of the logarithm of $z-w$, it follows that $f'(z) = \frac{1}{z-w}$. But then

$$\frac{1}{2\pi i} \int_\gamma f'(z)\,dz = n(\gamma, w) \neq 0,$$

contradicting the fact that the integral of a derivative over a closed curve is always $0$. Hence the assumption that $u$ had a harmonic conjugate was wrong.