only restart thread when the first time startup