aboutsummaryrefslogtreecommitdiff
path: root/jim-aio.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2018-07-08 10:41:01 +1000
committerSteve Bennett <steveb@workware.net.au>2018-07-08 10:42:50 +1000
commitbf7428e071c5d0cba86a30ca4fe895481da90428 (patch)
treea003d3c17cd576a69046ee3778a07e315652f658 /jim-aio.c
parent4e14340d067b2f09768e8284cdc26362e90bac39 (diff)
downloadjimtcl-bf7428e071c5d0cba86a30ca4fe895481da90428.zip
jimtcl-bf7428e071c5d0cba86a30ca4fe895481da90428.tar.gz
jimtcl-bf7428e071c5d0cba86a30ca4fe895481da90428.tar.bz2
aio: Fall back to stdio error if no ssl error
Conditions such as ECONNRESET may result in a failed ssl connection with no ssl error, so return the stdio error in this case rather than just "unknown SSL error" Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-aio.c')
-rw-r--r--jim-aio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/jim-aio.c b/jim-aio.c
index c743dcb..878fabc 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -256,9 +256,9 @@ static const char *ssl_strerror(struct AioFile *af)
if (err) {
return ERR_error_string(err, NULL);
}
-
- /* should not happen */
- return "unknown SSL error";
+ else {
+ return stdio_strerror(af);
+ }
}
static int ssl_verify(struct AioFile *af)