Fixed connection thread looping