From faa7b8dfaad1e9b57b780044d9ac65f297e5ae7a Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Tue, 17 Dec 2024 00:48:36 +0100 Subject: [PATCH] wolfSSLReceive: Error return on interrupted connection Interrupted connection should return control to the user since they may want to handle the signal that caused the interrupt. Otherwise, we might never give back control to the user (the timeout would error out but that causes a big delay). socat.yml: in test 475, the test would send a SIGTERM after 3 seconds. We would continue to ignore this signal and continue to call `recvfrom`. Instead we should error out and give control back to the user. --- .github/workflows/socat.yml | 2 +- src/internal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/socat.yml b/.github/workflows/socat.yml index 3d6d8fa58..91417e7a7 100644 --- a/.github/workflows/socat.yml +++ b/.github/workflows/socat.yml @@ -78,4 +78,4 @@ jobs: run: | export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH export SHELL=/bin/bash - SOCAT=$GITHUB_WORKSPACE/socat-1.8.0.0/socat ./test.sh -t 0.5 --expect-fail 36,64,146,214,216,217,309,310,386,399,402,403,459,460,467,468,478,492,528,530 + SOCAT=$GITHUB_WORKSPACE/socat-1.8.0.0/socat ./test.sh -t 0.5 --expect-fail 36,64,146,214,216,217,309,310,386,399,402,403,459,460,467,468,475,478,492,528,530 diff --git a/src/internal.c b/src/internal.c index ed25e70dd..f2cf820f6 100644 --- a/src/internal.c +++ b/src/internal.c @@ -10594,7 +10594,7 @@ retry: } } #endif - goto retry; + return WOLFSSL_FATAL_ERROR; case WC_NO_ERR_TRACE(WOLFSSL_CBIO_ERR_CONN_CLOSE): ssl->options.isClosed = 1;