Skip to content

http2: refactor ping + settings object lifetime management

Have clearer ownership relations between the Http2Ping, Http2Settings and Http2Session objects.

Ping and Settings objects are now owned by the Http2Session instance, and deleted along with it, so neither type of object refers to the session after it is gone. In the case of Http2Pings, that deletion is slightly delayed, so we explicitly reset its session_ property.

Fixes: https://github.com/nodejs/node/issues/28088

@nodejs/http2

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading