File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1989,6 +1989,7 @@ class Http2Stream extends Duplex {
19891989 // attempt to gracefully close the session.
19901990 const state = this [ kState ] ;
19911991 if ( this . headersSent &&
1992+ this [ kSession ] &&
19921993 this [ kSession ] [ kType ] === NGHTTP2_SESSION_SERVER &&
19931994 ! ( state . flags & STREAM_FLAGS_HAS_TRAILERS ) &&
19941995 ! state . didRead &&
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const common = require ( '../common' ) ;
4+ if ( ! common . hasCrypto )
5+ common . skip ( 'missing crypto' ) ;
6+ const h2 = require ( 'http2' ) ;
7+
8+ const server = h2 . createServer ( ) ;
9+ server . listen ( 0 , common . mustCall ( ( ) => {
10+ h2 . connect ( `http://localhost:${ server . address ( ) . port } ` , ( session ) => {
11+ session . request ( { ':method' : 'POST' } ) . end ( common . mustCall ( ( ) => {
12+ session . destroy ( ) ;
13+ server . close ( ) ;
14+ } ) ) ;
15+ } ) ;
16+ } ) ) ;
You can’t perform that action at this time.
0 commit comments