#endif
-int Connection::HandleBIOError(BIO *bio,
- const char* func,
- int rv,
- bool ignore_error) {
+int Connection::HandleBIOError(BIO *bio, const char* func, int rv) {
if (rv >= 0) return rv;
int retry = BIO_should_retry(bio);
static char ssl_error_buf[512];
ERR_error_string_n(rv, ssl_error_buf, sizeof(ssl_error_buf));
- if (!ignore_error) {
- HandleScope scope;
- Local<Value> e = Exception::Error(String::New(ssl_error_buf));
- handle_->Set(String::New("error"), e);
- }
+ HandleScope scope;
+ Local<Value> e = Exception::Error(String::New(ssl_error_buf));
+ handle_->Set(String::New("error"), e);
DEBUG_PRINT("[%p] BIO: %s failed: (%d) %s\n", ssl_, func, rv, ssl_error_buf);
}
-int Connection::HandleSSLError(const char* func, int rv, bool ignore_error) {
+int Connection::HandleSSLError(const char* func, int rv) {
if (rv >= 0) return rv;
int err = SSL_get_error(ssl_, rv);
static char ssl_error_buf[512];
ERR_error_string_n(err, ssl_error_buf, sizeof(ssl_error_buf));
- if (!ignore_error) {
- HandleScope scope;
- Local<Value> e = Exception::Error(String::New(ssl_error_buf));
- handle_->Set(String::New("error"), e);
- }
+ HandleScope scope;
+ Local<Value> e = Exception::Error(String::New(ssl_error_buf));
+ handle_->Set(String::New("error"), e);
DEBUG_PRINT("[%p] SSL: %s failed: (%d:%d) %s\n", ssl_, func, err, rv, ssl_error_buf);
int bytes_read = BIO_read(ss->bio_write_, buffer_data + off, len);
- ss->HandleBIOError(ss->bio_write_, "BIO_read:EncOut", bytes_read, true);
+ ss->HandleBIOError(ss->bio_write_, "BIO_read:EncOut", bytes_read);
ss->SetShutdownFlags();
return scope.Close(Integer::New(bytes_read));
static v8::Handle<v8::Value> Start(const v8::Arguments& args);
static v8::Handle<v8::Value> Close(const v8::Arguments& args);
- int HandleBIOError(BIO *bio, const char* func, int rv, bool ignore_error=false);
- int HandleSSLError(const char* func, int rv, bool ignore_error=false);
+ int HandleBIOError(BIO *bio, const char* func, int rv);
+ int HandleSSLError(const char* func, int rv);
+
void ClearError();
void SetShutdownFlags();