fix socket timeout bug