Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the bounded interrupted-send retry change.
No open issues 🎉
What changed in this PR
Bounds interrupted-send retries in SendBuffered() so persistent transport interrupts return WANT_WRITE instead of looping indefinitely, preserving buffered output for a later retry.
Changes:
- Limits interrupt retries using
WOLFSSL_MODE_AUTO_RETRY_ATTEMPTS. - Adds regression coverage for transient interrupts, retry exhaustion, and handshake recovery.
- Documents interrupted-send behavior for
EmbedSendandEmbedSendTo.
| File | Description |
|---|---|
tests/api/test_ssl_hs.h |
Declares and registers the interrupted-send test. |
tests/api/test_ssl_hs.c |
Tests bounded retries and recovery with buffered output. |
src/internal.c |
Bounds interrupt retries and returns WANT_WRITE when exhausted. |
doc/dox_comments/header_files/wolfio.h |
Documents the send retry limit and resulting behavior. |
Review effort: Balanced
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12168
Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): doc/dox_comments/header_files/wolfio.h, tests/api/test_ssl_hs.h
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
Description
SendBuffered() retried WOLFSSL_CBIO_ERR_ISR with an unconditional continue that neither consumed retryLimit nor made progress, so a send callback that kept reporting an interrupt (persistent EINTR, NetX NX_WAIT_ABORTED, or a custom transport) spun the calling API forever.
Retry ISR up to WOLFSSL_MODE_AUTO_RETRY_ATTEMPTS times, then return WANT_WRITE with the output still buffered so the caller can resume. Transient interrupts are still absorbed transparently.
Fixes zd22854
Testing
Add test_wolfSSL_hs_send_buffered_isr covering transient and persistent interrupts, and document the behavior for EmbedSend and EmbedSendTo.
Checklist