Skip to content

Commit

Permalink
Merge pull request #268 from Nordix/fix-sriov-ci-test
Browse files Browse the repository at this point in the history
fix for sriov ci test failure
  • Loading branch information
denis-tingaikin authored Sep 24, 2021
2 parents 411eece + 42575f3 commit 868bbc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/networkservice/common/token/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewServer(tokenKey string) networkservice.NetworkServiceServer {

func (s *tokenServer) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*networkservice.Connection, error) {
var tokenID string
if mechanism := kernel.ToMechanism(request.GetConnection().GetMechanism()); mechanism != nil || mechanism.GetDeviceTokenID() == "" {
if mechanism := kernel.ToMechanism(request.GetConnection().GetMechanism()); mechanism != nil && mechanism.GetDeviceTokenID() == "" {
if tokenID = s.config.assign(s.tokenName, request.GetConnection()); tokenID != "" {
mechanism.SetDeviceTokenID(tokenID)
}
Expand Down

0 comments on commit 868bbc1

Please sign in to comment.