Skip to content

Commit

Permalink
proxy; pass MaxTokenLifetime for expiration check
Browse files Browse the repository at this point in the history
Forgot to pass MaxTokenLifetime to fullmesh client
to include it in the endpoint expiration check.
  • Loading branch information
zolug committed Aug 13, 2024
1 parent f192489 commit bb0cd1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/proxy/internal/client/fullmesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (fmnsc *FullMeshNetworkServiceClient) checkEndpointExpiration() {
logger := fmnsc.logger.WithValues("func", "checkEndpointExpiration")
for name, endpoint := range fmnsc.networkServiceEndpoints {
if fmnsc.ctx.Err() != nil {
// If context is closed FullMeshNetworkServiceClient.Close() is expected anyways to clen up...
// If context is closed FullMeshNetworkServiceClient.Close() is expected anyways to clean up...
return
}
// Endpoint is considered expired if based on its ExpirationTime it's
Expand Down
2 changes: 2 additions & 0 deletions cmd/proxy/internal/service/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2021-2023 Nordix Foundation
Copyright (c) 2024 OpenInfra Foundation Europe
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,6 +58,7 @@ func GetNSC(ctx context.Context,
ConnectTo: config.ConnectTo,
APIClient: nsmAPIClient,
MonitorConnectionClient: monitorConnectionClient,
MaxTokenLifetime: config.MaxTokenLifetime,
}
// Note: naming the interface is left to NSM (refer to getNameFromConnection())
// However NSM does not seem to ensure uniqueness either. Might need to revisit...
Expand Down

0 comments on commit bb0cd1f

Please sign in to comment.