]> granicus.if.org Git - libevent/commit
Avoid spinning on OpenSSL reads
authorMark Ellzey <mark.thomas@mandiant.com>
Thu, 17 Nov 2011 16:59:41 +0000 (11:59 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 17 Nov 2011 16:59:41 +0000 (11:59 -0500)
commit2aa036fa0403977fa51812e711a1d5040c9fb5c9
tree306d1d82da6fb78911edd21911844fc5d17fd1bf
parent96c562fa495ccd325b93a59affcba5d06de250ec
Avoid spinning on OpenSSL reads

Previously, if some sender were generating data to read on an
OpenSSL connection as fast as we could process it, we could easily
wind up looping on an openssl do_read operation without ever
considering other sockets.

The difference between this and the original method in
consider_reading() is that it only loops for a single completed
*frame* instead of looping until fd is drained or an error condition
was triggered.

{Patch split out by nickm}
bufferevent_openssl.c