Skip to content

Conversation

@evpopov
Copy link
Contributor

@evpopov evpopov commented Nov 20, 2024

Description and Test Steps

Imagine that the DUT has it's network down.
User code calls FreeRTOS_getaddrinfo_a() and supplies a callback function.
If a Network-UP event happens after the call to FreeRTOS_getaddrinfo_a() but before the query times out, the user's callback function never gets called.

A colleague of mine traced that to the fact that +TCP re-initializes xCallbackList every time there is a Network-UP event.
I believe this is incorrect behavior. I see no good reason to blindly clear xCallbackList. This list was properly initialized already and is being managed correctly by the DNS handler and the DNS timer.

I believe this is a very simple and safe fix, but as always, I may have missed something.
Let me know what you think.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This code is causing DNS callbacks to not get called when the queries time out.
@evpopov evpopov requested a review from a team as a code owner November 20, 2024 21:07
ActoryOu
ActoryOu previously approved these changes Nov 21, 2024
@tony-josi-aws tony-josi-aws merged commit 5f41a38 into FreeRTOS:main Nov 21, 2024
10 checks passed
@evpopov evpopov deleted the DNSInit_PR branch November 25, 2024 18:36
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.

4 participants