fixed socket timeout bug