File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -329,8 +329,8 @@ export class Http2Channel extends EventEmitter implements Channel {
329329 stream : Http2CallStream ,
330330 metadata : Metadata
331331 ) {
332- const connectMetadata : Promise < Metadata > = this . connect ( ) . then (
333- ( ) => metadata . clone ( )
332+ const connectMetadata : Promise < Metadata > = this . connect ( ) . then ( ( ) =>
333+ metadata . clone ( )
334334 ) ;
335335 const finalMetadata : Promise < Metadata > = stream . filterStack . sendMetadata (
336336 connectMetadata
Original file line number Diff line number Diff line change @@ -284,11 +284,6 @@ export class Server {
284284 this . http2Server . on (
285285 'stream' ,
286286 ( stream : http2 . ServerHttp2Stream , headers : http2 . IncomingHttpHeaders ) => {
287- if ( ! this . started ) {
288- stream . end ( ) ;
289- return ;
290- }
291-
292287 const contentType = headers [ http2 . constants . HTTP2_HEADER_CONTENT_TYPE ] ;
293288
294289 if (
@@ -351,6 +346,13 @@ export class Server {
351346 }
352347 }
353348 ) ;
349+
350+ this . http2Server . on ( 'session' , session => {
351+ if ( ! this . started ) {
352+ session . destroy ( ) ;
353+ return ;
354+ }
355+ } ) ;
354356 }
355357}
356358
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class StreamDecoder {
3333 write ( data : Buffer ) : Buffer [ ] {
3434 let readHead = 0 ;
3535 let toRead : number ;
36- let result : Buffer [ ] = [ ] ;
36+ const result : Buffer [ ] = [ ] ;
3737
3838 while ( readHead < data . length ) {
3939 switch ( this . readState ) {
You can’t perform that action at this time.
0 commit comments