Since it can arrive after we disabled events in that bufferevent and
reseted fd, hence evhttp_error_cb() could be called after
SSL_RECEIVED_SHUTDOWN.
Closes: #557
(cherry picked from commit
da3f2ba22adcabaf7355a90d537b4928d0c168d2)
struct evbuffer *tmp;
int err;
+ bufferevent_setcb(evcon->bufev, NULL, NULL, NULL, NULL);
+
/* XXXX This is not actually an optimal fix. Instead we ought to have
an API for "stop connecting", or use bufferevent_setfd to turn off
connecting. But for Libevent 2.0, this seems like a minimal change