Skip to content

async-ares: fix query counter handling - #21399

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:async-query-counts
Closed

icing wants to merge 1 commit into
curl:masterfrom
icing:async-query-counts

Conversation

@icing

@icing icing commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

When starting an c-ares query, the provided callback may be invoked right away, leading to a decrement of queries_ongoing. Increment the counter before call c-ares. Otherwise, the async->done bit is not properly set.

When starting an c-ares query, the provided callback may be invoked
right away, leading to a decrement of `queries_ongoing`. Increment
the counter *before* call c-ares. Otherwise, the `async->done` bit
is not properly set.
@icing icing added the name lookup DNS and related tech label Apr 21, 2026
@icing
icing requested a review from bagder April 21, 2026 13:45
@bagder bagder closed this in ad1fcd6 Apr 21, 2026
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
When starting an c-ares query, the provided callback may be invoked
right away, leading to a decrement of `queries_ongoing`. Increment
the counter *before* call c-ares. Otherwise, the `async->done` bit
is not properly set.

Closes curl#21399
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech

Development

Successfully merging this pull request may close these issues.

2 participants