From 4a343943bd5c93ea1a4c0b80633bc417aeb63969 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 26 Jul 2011 10:31:18 +0200 Subject: [PATCH] Propagate errors on the underlying bufferevent to the user. --- bufferevent_openssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index 273be8fb..c5d242ea 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -814,6 +814,9 @@ be_openssl_eventcb(struct bufferevent *bev_base, short what, void *ctx) } else if (what & BEV_EVENT_TIMEOUT) { /* We sure didn't set this. Propagate it to the user. */ event = what; + } else if (what & BEV_EVENT_ERROR) { + /* An error occurred on the connection. Propagate it to the user. */ + event = what; } else if (what & BEV_EVENT_CONNECTED) { /* Ignore it. We're saying SSL_connect() already, which will eat it. */