The wavefunction $\psi(x_1,x_2)$ assigns a complex number to each point in configuration space and is continuous, but possibly has many branches as far as phase is concerned. Consider a path $\gamma_0(\tau)$ in configuration space such that
$$\gamma_0(0)=(x_1,x_2),\quad \gamma_0(1)=(x_2,x_1).$$
Then the value of the complex number $\psi(\gamma_0(\tau))$ will change continuously from $\psi(\gamma_0(0))$ to $\psi(\gamma_0(1))=\eta_0\psi(\gamma_0(0))$, where $\eta_0$ is some phase. This last equality up to a phase follows from the indistinguishability of the particles.
We can repeat this with another path $\gamma_1$ with the same endpoints and get $\psi(\gamma_1(1))=\eta_1\psi(\gamma_1(0))$, where $\eta_1$ can be different from $\eta_0$ if the two paths go on different branches.
But if the paths are homotopic, i.e. there is a continuous function $\gamma_\sigma(\tau)$ of $\sigma,\tau$, which interpolates between $\gamma_0$ and $\gamma_1$ then we must have $\eta_0=\eta_1$ by continuity.
Moreover we can construct a loop which starts and ends on $(x_1,x_2)$ by traversing the path $\gamma_0$ and then the reverse of the path $\gamma_1$, and in general the endpoint of this loop would lead to $\eta_0\eta_1^*\psi(x_1,x_2)$, but if the two paths are homotopic this loop can be contracted to the trivial loop which never moves from $(x_1,x_2)$ so $\eta_0\eta_1^*=\eta_0\eta_0^*=1$, from which we see $\eta_0=\pm 1$.