fix bug:conn.end() twice throw a error