diff options
author | David Halls <dahalls@gmail.com> | 2020-11-24 02:35:04 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-12-01 17:47:16 +0300 |
commit | 83166fb86cda91cbe2a8c126698419f51c063910 (patch) | |
tree | 72e439449ce3b86d1726d1dbca5923f28266f5cd /src/node_http2.cc | |
parent | 1d82d1e56623554077ff001eaae0e2d50af36c62 (diff) |
http2: check write not scheduled in scope destructor
Fixes: https://github.com/nodejs/node/issues/33156
PR-URL: https://github.com/nodejs/node/pull/36241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 776393de8f8..1e2da918bf5 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -88,7 +88,8 @@ Http2Scope::Http2Scope(Http2Session* session) : session_(session) { Http2Scope::~Http2Scope() { if (!session_) return; session_->set_in_scope(false); - session_->MaybeScheduleWrite(); + if (!session_->is_write_scheduled()) + session_->MaybeScheduleWrite(); } // The Http2Options object is used during the construction of Http2Session |