File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,7 @@ Socket.prototype.destroySoon = function() {
476
476
Socket . prototype . _destroy = function ( exception , cb ) {
477
477
debug ( 'destroy' ) ;
478
478
479
- function fireErrorCallbacks ( self ) {
479
+ function fireErrorCallbacks ( self , exception , cb ) {
480
480
if ( cb ) cb ( exception ) ;
481
481
if ( exception && ! self . _writableState . errorEmitted ) {
482
482
process . nextTick ( emitErrorNT , self , exception ) ;
@@ -486,7 +486,7 @@ Socket.prototype._destroy = function(exception, cb) {
486
486
487
487
if ( this . destroyed ) {
488
488
debug ( 'already destroyed, fire error callbacks' ) ;
489
- fireErrorCallbacks ( this ) ;
489
+ fireErrorCallbacks ( this , exception , cb ) ;
490
490
return ;
491
491
}
492
492
@@ -518,7 +518,7 @@ Socket.prototype._destroy = function(exception, cb) {
518
518
// to make it re-entrance safe in case Socket.prototype.destroy()
519
519
// is called within callbacks
520
520
this . destroyed = true ;
521
- fireErrorCallbacks ( this ) ;
521
+ fireErrorCallbacks ( this , exception , cb ) ;
522
522
523
523
if ( this . _server ) {
524
524
COUNTER_NET_SERVER_CONNECTION_CLOSE ( this ) ;
You can’t perform that action at this time.
0 commit comments