Skip to content

Curl gh fix#459

Merged
dgarske merged 2 commits intowolfSSL:masterfrom
embhorn:curl_gh_fix
Feb 5, 2026
Merged

Curl gh fix#459
dgarske merged 2 commits intowolfSSL:masterfrom
embhorn:curl_gh_fix

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Feb 4, 2026

  1. Handles partial transfers correctly - accumulates bytes in sock->bytes
  2. Reduces round-trips - loops internally until complete instead of returning
    MQTT_CODE_CONTINUE for each partial transfer
  3. Properly waits - uses mqttcurl_wait when CURLE_AGAIN is returned
  4. Handles connection closed - returns MQTT_CODE_ERROR_NETWORK when recvd == 0

@embhorn embhorn self-assigned this Feb 4, 2026
Change NetRead and NetWrite to loop internally until the entire
transfer completes rather than returning MQTT_CODE_CONTINUE for
partial transfers. This reduces round-trips and prevents timeout
issues while still correctly handling partial data.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@embhorn embhorn requested review from dgarske and philljj February 4, 2026 19:59
@dgarske dgarske self-assigned this Feb 4, 2026
Copy link
Copy Markdown
Contributor

@philljj philljj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Definitely an improvement over the original implementation.

Tiny suggestion but not mandatory: check if sock->bytes > buf_len or similar, in case curl_easy_send/recv sets something nonsense to size_t * n.

@dgarske dgarske merged commit cc4c3a6 into wolfSSL:master Feb 5, 2026
14 of 15 checks passed
@embhorn embhorn deleted the curl_gh_fix branch April 21, 2026 16:12
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.

3 participants