Imported Upstream version 1.46.0
[platform/upstream/nghttp2.git] / src / shrpx_rate_limit.cc
index f05ae64..0d4f921 100644 (file)
@@ -108,9 +108,10 @@ void RateLimit::stopw() {
 }
 
 void RateLimit::handle_tls_pending_read() {
-  if (!conn_ || !conn_->tls.ssl || !conn_->tls.initial_handshake_done ||
+  if (!conn_ || !conn_->tls.ssl ||
       (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;
   }