mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
Merge pull request #2134 from nghttp2/nghttpd-fix-stall
nghttpd: Fix read stall
This commit is contained in:
@@ -750,6 +750,7 @@ int Http2Handler::read_tls() {
|
||||
|
||||
ERR_clear_error();
|
||||
|
||||
for (;;) {
|
||||
auto rv = SSL_read(ssl_, buf.data(), buf.size());
|
||||
|
||||
if (rv <= 0) {
|
||||
@@ -780,6 +781,11 @@ int Http2Handler::read_tls() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (SSL_pending(ssl_) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return write_(*this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user