Skip to content

Commit

Permalink
Remove forwarder name from discoverforwarder metadata if it is not av…
Browse files Browse the repository at this point in the history
…ailable (#1204)

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art committed Dec 22, 2021
1 parent 218e633 commit 371fbd8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/networkservice/common/discoverforwarder/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ func (d *discoverForwarderServer) Request(ctx context.Context, request *networks
return nil, errors.WithStack(err)
}

return next.Server(ctx).Request(clienturlctx.WithClientURL(ctx, u), request)
conn, err := next.Server(ctx).Request(clienturlctx.WithClientURL(ctx, u), request)
if err != nil {
storeForwarderName(ctx, "")
}
return conn, err
}

func (d *discoverForwarderServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
Expand Down

0 comments on commit 371fbd8

Please sign in to comment.