bug fix:can't close connection.