fixed client thread connection bug