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

[Libevent-users] PATCH: bufferevent_openssl consider_read doesn't drain underlying BE in all cases



<resending as per Nick's request>

Hi,

I was investigating an issue with filtered openssl buffer events. The bufferevent stopped processing / pumping SSL data event when there was data available in the underlying BE. This is a regression in 2.0.16 and I believe the follow commit might have caused it:https://github.com/libevent/libevent/commit/2aa036fa0403977fa51812e711a1d5040c9fb5c9

Nick's suggestion of logging the number of bytes left in the underlying BE to see whether there was data available showed SSL_pending() ends up returning 0 in some cases even when the underlying BE's input buffer has data left to consume. I've created the patch below and it seems to fix the issue on my end.

You can find the fix here: https://github.com/haseebq/libevent/commit/c58d9d8d437d122a8b67d42a6126d81699ec6914

Ps - I haven't tried to reproduce this bug in a stand alone project yet.

Thanks. 


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