@@ -122,20 +122,6 @@ function onStreamDrain() {
122122 response . emit ( 'drain' ) ;
123123}
124124
125- // TODO Http2Stream does not emit 'close'
126- function onStreamClosedRequest ( ) {
127- const request = this [ kRequest ] ;
128- if ( request !== undefined )
129- request . push ( null ) ;
130- }
131-
132- // TODO Http2Stream does not emit 'close'
133- function onStreamClosedResponse ( ) {
134- const response = this [ kResponse ] ;
135- if ( response !== undefined )
136- response . emit ( 'finish' ) ;
137- }
138-
139125function onStreamAbortedRequest ( ) {
140126 const request = this [ kRequest ] ;
141127 if ( request !== undefined && request [ kState ] . closed === false ) {
@@ -247,7 +233,6 @@ class Http2ServerRequest extends Readable {
247233 stream . on ( 'trailers' , onStreamTrailers ) ;
248234 stream . on ( 'end' , onStreamEnd ) ;
249235 stream . on ( 'error' , onStreamError ) ;
250- stream . on ( 'close' , onStreamClosedRequest ) ;
251236 stream . on ( 'aborted' , onStreamAbortedRequest ) ;
252237 const onfinish = this [ kFinish ] . bind ( this ) ;
253238 stream . on ( 'close' , onfinish ) ;
@@ -380,7 +365,6 @@ class Http2ServerResponse extends Stream {
380365 stream [ kResponse ] = this ;
381366 this . writable = true ;
382367 stream . on ( 'drain' , onStreamDrain ) ;
383- stream . on ( 'close' , onStreamClosedResponse ) ;
384368 stream . on ( 'aborted' , onStreamAbortedResponse ) ;
385369 const onfinish = this [ kFinish ] . bind ( this ) ;
386370 stream . on ( 'close' , onfinish ) ;
0 commit comments