fix socket err bug