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

Order for inline client check #132

Closed
thedevop opened this issue Jan 7, 2023 · 3 comments
Closed

Order for inline client check #132

thedevop opened this issue Jan 7, 2023 · 3 comments

Comments

@thedevop
Copy link
Collaborator

thedevop commented Jan 7, 2023

Hi,

@mochi-co , are you ok in changing the order of all the inline checks, one example is:
from
if !s.hooks.OnACLCheck(cl, pk.TopicName, true) && !cl.Net.Inline { return nil }
to
if !cl.Net.Inline && !s.hooks.OnACLCheck(cl, pk.TopicName, true) { return nil }

This avoids unnecessary processing and error logs from custom ACL hook.

@mochi-co
Copy link
Collaborator

mochi-co commented Jan 7, 2023

Yes absolutely, this is a great idea! I can do this or you can submit a PR if you already have changes 👍🏻

@thedevop
Copy link
Collaborator Author

thedevop commented Jan 7, 2023

I'll submit a PR.

@mochi-co
Copy link
Collaborator

mochi-co commented Jan 7, 2023

Merged in v2.1.2 - Thank you @thedevop!

@mochi-co mochi-co closed this as completed Jan 7, 2023
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

No branches or pull requests

2 participants