resolve the net.conn close twice problem