fix socket connect error bug