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

Add defensive code in case mechanism elements are mistakenly chain elmements #140

Merged
merged 1 commit into from
Feb 23, 2020

Conversation

edwarnicke
Copy link
Member

mechanisms.NewServer(map[string]networkservice.NetworkServiceServer) presumes
that the provided implementations for a mechanism don't chain, but simply return to it when they are done.

The probability of an implementor getting that right is basically zero, so we wrap them in a chain
to make sure that if they call next.Server(ctx).{Request/Close} they don't continue down the
chain that mechanisms.NewServer is on.

…mements

mechanisms.NewServer(map[string]networkservice.NetworkServiceServer) presumes
that the provided implementations for a mechanism *don't* chain, but simply return to it when they are done.

The probability of an implementor getting that right is basically zero, so we wrap them in a chain
to make sure that if they call next.Server(ctx).{Request/Close} they don't continue down the
chain that mechanisms.NewServer is on.

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
@fkautz fkautz merged commit 80f2ccf into networkservicemesh:master Feb 23, 2020
nsmbot pushed a commit that referenced this pull request May 14, 2022
…i@main

PR link: networkservicemesh/api#140

Commit: 73abc06
Author: Denis Tingaikin
Date: 2022-05-14 22:36:44 +0300
Message:
  - pass only ip addresses into template (#140)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
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

Successfully merging this pull request may close these issues.

2 participants