diff options
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r-- | ext/openssl/ossl_ssl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 89c4ec1c6c..e85430e859 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -517,7 +517,7 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self) continue; case SSL_ERROR_SYSCALL: if(ERR_peek_error() == 0 && nread == 0) rb_eof_error(); - ossl_raise(eSSLError, "SSL_read: %s", strerror(errno)); + rb_sys_fail(0); default: ossl_raise(eSSLError, "SSL_read:"); } @@ -556,6 +556,8 @@ ossl_ssl_write(VALUE self, VALUE str) case SSL_ERROR_WANT_READ: rb_thread_schedule(); continue; + case SSL_ERROR_SYSCALL: + rb_eof_error(); default: ossl_raise(eSSLError, "SSL_write:"); } |