Commit a81b3fb
committed
fix(ssl_client): chunk TLS writes and reset timeout after progress to reduce mid-body resets
Send large TLS payloads in moderate chunks (4 KiB) instead of a single large write,
and measure the write timeout from the last successful progress. This significantly
reduces sporadic MBEDTLS_ERR_NET_CONN_RESET (-0x0050) observed during long HTTP bodies
(e.g., multipart uploads).
- write loop remains intact; now caps per-call size to 4096 bytes
- updates timeout window after each positive write to avoid false timeouts on slow links
- no API changes; handshake/verification paths unaffected
Sources
Ask ChatGPT1 parent 0398bff commit a81b3fb
1 file changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
| 416 | + | |
| 417 | + | |
418 | 418 | | |
| 419 | + | |
419 | 420 | | |
420 | | - | |
421 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
422 | 427 | | |
423 | 428 | | |
| 429 | + | |
424 | 430 | | |
425 | 431 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
429 | 436 | | |
| 437 | + | |
430 | 438 | | |
431 | | - | |
432 | | - | |
| 439 | + | |
| 440 | + | |
433 | 441 | | |
| 442 | + | |
434 | 443 | | |
435 | 444 | | |
| 445 | + | |
436 | 446 | | |
437 | 447 | | |
438 | 448 | | |
| |||
0 commit comments