Skip to content

Return false from log/logf when the packet could not be sent - #33

Merged
arcao merged 1 commit into
masterfrom
fix/report-send-failure
Oct 12, 2026
Merged

arcao merged 1 commit into
masterfrom
fix/report-send-failure

Conversation

@arcao

@arcao arcao commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

_sendLog ignored the result of UDP::endPacket() and always returned true. When the network stack drops a packet, log() / logf() still reported success. For example, on ESP32 sendto fails with ENOMEM when the ARP queue (3 packets) is full right after connecting.

Now log() / logf() return false when endPacket() fails, so sketches can detect lost messages. This helps diagnose #22.

Behaviour is otherwise unchanged. Messages filtered out by logMask still return true.

Test plan

🤖 Generated with Claude Code

https://claude.ai/code/session_015dqPaWXEZmNHreFax2RpKq

_sendLog ignored the result of UDP::endPacket() and always returned true,
so a packet dropped by the network stack (e.g. full ARP queue on ESP32)
was reported as sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dqPaWXEZmNHreFax2RpKq
@arcao
arcao merged commit 31c78ab into master Oct 12, 2026
7 checks passed
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