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

Limit callbacks without updates to 1 per 30s; ensure slist is freed even if there isn't a callback #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtbr
Copy link

@jtbr jtbr commented May 26, 2023

Could just be my network, but I can get callbacks many times in a single second with an apparently empty slist.

[23:49:06.987466] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:06.987654] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:06.987706] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.058365] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.267265] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.267363] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.268833] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.286907] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.287008] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.287062] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.287113] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.287158] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.293361] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.293506] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.301853] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.523187] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.523277] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.528106] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.712744] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.712849] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.712901] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:07.716325] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:08.006569] mDNSsearchCallback:718 ----------------- round ------------------
[23:49:08.006688] mDNSsearchCallback:718 ----------------- round ------------------

This change will limit that to no more than one per 30 seconds. Minor optimization, but still, seems worth having. It also ensures that slist is freed in the unusual case that there is no callback provided.

ensure slist is freed even if there isn't a callback
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.

1 participant