summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r--ext/openssl/ossl_ssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 01b44f3..efe2eb8 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -462,7 +462,7 @@ ossl_start_ssl(VALUE self, int (*func)())
rb_io_wait_readable(fileno(fptr->f));
continue;
case SSL_ERROR_SYSCALL:
- rb_sys_fail(0);
+ if (errno) rb_sys_fail(0);
default:
ossl_raise(eSSLError, NULL);
}
@@ -567,7 +567,7 @@ ossl_ssl_write(VALUE self, VALUE str)
rb_io_wait_readable(fileno(fptr->f));
continue;
case SSL_ERROR_SYSCALL:
- rb_sys_fail(0);
+ if (errno) rb_sys_fail(0);
default:
ossl_raise(eSSLError, "SSL_write:");
}