Stopping the DNSCrypt UDP listener logs no receive warning #290
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!290
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/22-dnscrypt-stop-warning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stopping the DNSCrypt UDP listener no longer logs "Error receiving a DNSCrypt UDP datagram." as a Warning.
DnsCryptUdpListener.StopAsyncclearsIsListeningbefore it closes the sockets, and the stopping token is cancelled only afterwards. The receive loop therefore now treats aSocketExceptionas the stop whenIsListeningis false, the same rule and comment asUdpDnsListener. A socket error while still listening is still logged.StopAsync_WhileReceiveLoopsArePending_LogsNoWarninginDnsCryptUdpReceiveTests.Evidence: the race is real but rare. A temporary loop of 50 cycles (query, reply, stop) was run five times on each side. It logged 4 warnings in 250 cycles before the fix and 0 in 250 after. The single-stop guard test therefore rarely fails on unfixed code. The verifier confirmed it passes on the parent. That is a guard, as the issue expected.
Tests:
Ninlil.Dns.Protocol.DnsCrypt.Testspasses 54 of 54, five runs by the coder and three by the verifier. The verifier passed the change.Closes #22
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK