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

Re: [Libevent-users] How to set "allow_dirty_shutdown" for SSL?



Indeed, currently there are no means to change this flag. IMO,
however, that shouldn't be needed if the shutdown process properly
occurs.

In a quick look, conn_closed() seems to be handling it correctly,
which means libevent will invoke the event callback with BEV_EVENT_EOF
upon a *clean* shutdown.

So, I would blame your client(s) for not properly disconnecting, but
it's much easier to set a breakpoint on conn_closed() and check the
following:
- errcode value must be 6 (SSL_ERROR_ZERO_RETURN);
- the "if" statement with SSL_get_shutdown(), must evaluate true;

Please, let us know how it goes.

Best,
Jardel

On Mon, Jan 11, 2010 at 3:28 PM, Joachim Bauch <jojo@xxxxxxxxxxx> wrote:
> Hello,
>
> I have a SSL-aware server using libevent 2.0.3. For most clients
> that are disconnecting, "be_openssl_eventcb" is called with an event
> of "BEV_EVENT_EOF", triggering a "BEV_EVENT_ERROR" in my application
> callback due to "allow_dirty_shutdown" being empty.
>
> There seems to be no way to set this flag from anywhere (application
> or inside libevent), is this intentional or just a missing feature?
>
> Best regards,
>  Joachim Bauch
>
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users    in the body.
>
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.