← Commit list

708b3f8b4e

Stefan Eissing
Stefan Eissing
2026-03-20
SUCCESS Duration: 259s

Subject

wolfssl: fix handling of abrupt connection close

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/wolfssl.c+6 -6
@@ -2017,13 +2017,13 @@ static CURLcode wssl_recv(struct Curl_cfilter *cf,
case WOLFSSL_ERROR_NONE:
case WOLFSSL_ERROR_WANT_READ:
case WOLFSSL_ERROR_WANT_WRITE:
- if(!wssl->io_result && connssl->peer_closed) {
- CURL_TRC_CF(data, cf, "wssl_recv(len=%zu) -> CLOSED", blen);
- return CURLE_OK;
+ if(!wssl->io_result && !connssl->peer_closed) {
+ /* there is data pending, re-invoke wolfSSL_read() */
+ CURL_TRC_CF(data, cf, "wssl_recv(len=%zu) -> AGAIN", blen);
+ return CURLE_AGAIN;
}
- /* there is data pending, re-invoke wolfSSL_read() */
- CURL_TRC_CF(data, cf, "wssl_recv(len=%zu) -> AGAIN", blen);
- return CURLE_AGAIN;
+ /* fall through to default error handling below */
+ FALLTHROUGH();
default:
if(wssl->io_result == CURLE_AGAIN) {
CURL_TRC_CF(data, cf, "wssl_recv(len=%zu) -> AGAIN", blen);