Better handling of tls and early data buffer
This commit is contained in:
Tatsuhiro Tsujikawa 2020-07-14 19:47:08 +09:00
parent 62411f5a6e
commit d5550e946d
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}