When I used option --auto-discover-databases, database get dublicate connection.

Maybe you neeed change query in function queryDatabases(server *Server) ([]string, error)
Old query: "SELECT datname FROM pg_database WHERE datallowconn = true AND datistemplate = false"
New query (for excluding current connection database): "SELECT datname FROM pg_database WHERE datallowconn = true AND datistemplate = false and datname!=current_database()"