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

Do fewer session refreshes. Fixes #468 #469

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

plorenz
Copy link
Member

@plorenz plorenz commented Dec 14, 2023

No description provided.

@plorenz plorenz requested a review from a team as a code owner December 14, 2023 18:25
ziti/ziti.go Outdated
svcRefreshInterval = DefaultServiceRefreshInterval
}
if svcRefreshInterval < time.Second {
svcRefreshInterval = time.Second
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is too aggressive for a default (when the caller probably made a mistake)? Also a minRefreshInterval constant to cover session and service refreshes might make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that a developer might want to set it this low. So if the dev forgot to set it at all, it will get set to the default value, but if they have set it to something low, we'll cap it at 1 second.

I'll add a constant for minRefreshInterval

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constant added

@plorenz plorenz merged commit 81b3733 into main Dec 14, 2023
8 checks passed
@plorenz plorenz deleted the fewer-session-refreshes branch December 14, 2023 21:53
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