Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeport 's connections operation code maybe has some problem #359

Open
wildfire2015 opened this issue Nov 29, 2022 · 0 comments
Open

nodeport 's connections operation code maybe has some problem #359

wildfire2015 opened this issue Nov 29, 2022 · 0 comments

Comments

@wildfire2015
Copy link

wildfire2015 commented Nov 29, 2022

ex:

public void AddConnections(NodePort targetPort) 
{
            int connectionCount = targetPort.ConnectionCount;
            for (int i = 0; i < connectionCount; i++) {
                PortConnection connection = targetPort.connections[i];
                NodePort otherPort = connection.Port;
                Connect(otherPort);
            }
}

when targetport 's connections to port,has some overrider port,connect will reduce the targetport.connections

public void MoveConnections(NodePort targetPort)
 {
            int connectionCount = connections.Count;

            // Add connections to target port
            for (int i = 0; i < connectionCount; i++) {
                PortConnection connection = targetPort.connections[i];
                NodePort otherPort = connection.Port;
                Connect(otherPort);
            }
            ClearConnections();
 }

when targetPort has no connections ,will get a exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant