Files
node/lib
RidgeA 8babbc5e45 http2: remove waitTrailers listener after closing a stream
When `writeHeader` of `Http2ServerResponse` instance are called with
204, 205 and 304 status codes an underlying stream closes.
If call `end` method after sending any of these status codes it will
cause an error `TypeError: Cannot read property 'Symbol(trailers)' of
undefined` because a reference to `Http2ServerResponse` instance
associated with Http2Stream already was deleted.
The closing of stream causes emitting `waitTrailers` event and, when
this event handles inside `onStreamTrailerReady` handler, there is
no reference to Http2ServerResponse instance.

Fixes: https://github.com/nodejs/node/issues/21740
PR-URL: https://github.com/nodejs/node/pull/21764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-07-16 01:49:05 +02:00
..
2018-04-13 19:59:44 +02:00
2018-07-13 17:47:13 +03:00
2018-05-18 15:25:42 +02:00
2018-06-20 13:35:27 -04:00
…
…
2018-04-16 16:02:12 +02:00
…
2018-05-18 15:25:40 +02:00
2018-05-18 15:32:05 +02:00
2018-04-26 19:42:48 +02:00
2018-06-05 18:57:44 -07:00