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

Destroy PathContext #103

Closed
lynnmatrix opened this issue Aug 13, 2015 · 2 comments
Closed

Destroy PathContext #103

lynnmatrix opened this issue Aug 13, 2015 · 2 comments

Comments

@lynnmatrix
Copy link

After new Path set to Flow, the contexts in the old path may be destroyed.
Why only the tail of the old path will be destroyed rather than all contexts which are not in the new path?

The commented in the following code is what I wants to do.

  /** Finds the tail of this path which is not in the given path, and destroys it. */
  public void destroyNotIn(PathContext path, PathContextFactory factory) {
    Iterator<Path> aElements = this.path.elements().iterator();
    Iterator<Path> bElements = path.path.elements().iterator();
    while (aElements.hasNext() && bElements.hasNext()) {
      Path aElement = aElements.next();
      Path bElement = bElements.next();
      if (!aElement.equals(bElement)) {
        factory.tearDownContext(contexts.get(aElement));
        break;
      }
    }
   /**
    while (aElements.hasNext()) {
      factory.tearDownContext(contexts.get(aElements.next()));
    }
  **/
  }
@Zhuinden
Copy link

You are correct, I referred to this problem here as well:

#116

@loganj
Copy link
Collaborator

loganj commented Feb 4, 2016

PathContext is dead, and this should be fixed via KeyManager (on master now)

@loganj loganj closed this as completed Feb 4, 2016
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

3 participants