@@ -79,6 +79,7 @@ const {
79
79
} ,
80
80
} = require ( 'internal/errors' ) ;
81
81
const {
82
+ assignFunctionName,
82
83
kEmptyObject,
83
84
promisify,
84
85
SymbolAsyncDispose,
@@ -573,17 +574,17 @@ function Server(options, requestListener) {
573
574
ObjectSetPrototypeOf ( Server . prototype , net . Server . prototype ) ;
574
575
ObjectSetPrototypeOf ( Server , net . Server ) ;
575
576
576
- Server . prototype . close = function ( ) {
577
+ Server . prototype . close = function close ( ) {
577
578
httpServerPreClose ( this ) ;
578
579
ReflectApply ( net . Server . prototype . close , this , arguments ) ;
579
580
return this ;
580
581
} ;
581
582
582
- Server . prototype [ SymbolAsyncDispose ] = async function ( ) {
583
+ Server . prototype [ SymbolAsyncDispose ] = assignFunctionName ( SymbolAsyncDispose , async function ( ) {
583
584
return promisify ( this . close ) . call ( this ) ;
584
- } ;
585
+ } ) ;
585
586
586
- Server . prototype . closeAllConnections = function ( ) {
587
+ Server . prototype . closeAllConnections = function closeAllConnections ( ) {
587
588
if ( ! this [ kConnections ] ) {
588
589
return ;
589
590
}
@@ -595,7 +596,7 @@ Server.prototype.closeAllConnections = function() {
595
596
}
596
597
} ;
597
598
598
- Server . prototype . closeIdleConnections = function ( ) {
599
+ Server . prototype . closeIdleConnections = function closeIdleConnections ( ) {
599
600
if ( ! this [ kConnections ] ) {
600
601
return ;
601
602
}
@@ -618,7 +619,8 @@ Server.prototype.setTimeout = function setTimeout(msecs, callback) {
618
619
return this ;
619
620
} ;
620
621
621
- Server . prototype [ EE . captureRejectionSymbol ] = function ( err , event , ...args ) {
622
+ Server . prototype [ EE . captureRejectionSymbol ] =
623
+ assignFunctionName ( EE . captureRejectionSymbol , function ( err , event , ...args ) {
622
624
switch ( event ) {
623
625
case 'request' : {
624
626
const { 1 : res } = args ;
@@ -639,7 +641,7 @@ Server.prototype[EE.captureRejectionSymbol] = function(err, event, ...args) {
639
641
net . Server . prototype [ SymbolFor ( 'nodejs.rejection' ) ]
640
642
. apply ( this , arguments ) ;
641
643
}
642
- } ;
644
+ } ) ;
643
645
644
646
function checkConnections ( ) {
645
647
if ( this . headersTimeout === 0 && this . requestTimeout === 0 ) {
0 commit comments