From d5550e946d0a34b6393576fc01270eb793d7b62b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 14 Jul 2020 19:47:08 +0900 Subject: [PATCH] Amend f1d8547b2923007d2a4095bb75d88f09000bd40b Better handling of tls and early data buffer --- src/shrpx_rate_limit.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shrpx_rate_limit.cc b/src/shrpx_rate_limit.cc index 8e3134d3..0d4f9212 100644 --- a/src/shrpx_rate_limit.cc +++ b/src/shrpx_rate_limit.cc @@ -109,9 +109,9 @@ void RateLimit::stopw() { void RateLimit::handle_tls_pending_read() { if (!conn_ || !conn_->tls.ssl || - (conn_->tls.rbuf.rleft() == 0 && !conn_->tls.initial_handshake_done) || (SSL_pending(conn_->tls.ssl) == 0 && conn_->tls.rbuf.rleft() == 0 && - conn_->tls.earlybuf.rleft() == 0)) { + (!conn_->tls.initial_handshake_done || + conn_->tls.earlybuf.rleft() == 0))) { return; }