[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] bufferevent_openssl's output callback



On Wed, Nov 12, 2014 at 01:10:06PM -0500, Catalin Patulea wrote:
> On Wed, Nov 12, 2014 at 12:46 PM, Mark Ellzey <mthomas@xxxxxxxxxx> wrote:
> > Are you by chance running in a threaded manner?
> Nope :-\

I was still in 2.0 land of thought. I realized that this must be in the
alpha.  I used your ssl.tabimado.net host for testing. 

Poking around, there is definitely some bad things going on all around:

- http.c chunked response parsing (really? this is what we still do?). 
  * ishuts down the socket once the last chunk has been read
      evhttp_read_trailer() 
          -> evhttp_connection_done() 
             -> evhttp_request_free()) (removes and frees the request)

- bevssl.c : also shuts down the same socket at some point, which I think
  eventually calls "conn_closed" which then calls bufferevent_run_eventcb_ 
  
  which I guess calls evhttp_error_cb() with the conditionals matching
  "(what & ((BEV_EVENT_EOF|BEV_EVENT_ERROR))", which enters into
  evhttp_connection_fail_(), with a NULL request. 

Enough "whiches"?

This is a terrible mess.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.