Exclude num_idle_streams when counting active stream

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-29 00:58:41 +09:00
parent a2486daee1
commit 7ae6e6b4c5
1 changed files with 2 additions and 1 deletions

View File

@ -5853,7 +5853,8 @@ int nghttp2_session_recv(nghttp2_session *session) {
* reserved state.
*/
static size_t session_get_num_active_streams(nghttp2_session *session) {
return nghttp2_map_size(&session->streams) - session->num_closed_streams;
return nghttp2_map_size(&session->streams) - session->num_closed_streams -
session->num_idle_streams;
}
int nghttp2_session_want_read(nghttp2_session *session) {