@@ -206,19 +206,19 @@ exports.ClientRequest = ClientRequest;
206
206
207
207
ClientRequest . prototype . aborted = undefined ;
208
208
209
- ClientRequest . prototype . _finish = function ( ) {
209
+ ClientRequest . prototype . _finish = function _finish ( ) {
210
210
DTRACE_HTTP_CLIENT_REQUEST ( this , this . connection ) ;
211
211
LTTNG_HTTP_CLIENT_REQUEST ( this , this . connection ) ;
212
212
COUNTER_HTTP_CLIENT_REQUEST ( ) ;
213
213
OutgoingMessage . prototype . _finish . call ( this ) ;
214
214
} ;
215
215
216
- ClientRequest . prototype . _implicitHeader = function ( ) {
216
+ ClientRequest . prototype . _implicitHeader = function _implicitHeader ( ) {
217
217
this . _storeHeader ( this . method + ' ' + this . path + ' HTTP/1.1\r\n' ,
218
218
this . _renderHeaders ( ) ) ;
219
219
} ;
220
220
221
- ClientRequest . prototype . abort = function ( ) {
221
+ ClientRequest . prototype . abort = function abort ( ) {
222
222
if ( this . aborted === undefined ) {
223
223
process . nextTick ( emitAbortNT , this ) ;
224
224
}
@@ -567,7 +567,7 @@ function tickOnSocket(req, socket) {
567
567
req . emit ( 'socket' , socket ) ;
568
568
}
569
569
570
- ClientRequest . prototype . onSocket = function ( socket ) {
570
+ ClientRequest . prototype . onSocket = function onSocket ( socket ) {
571
571
process . nextTick ( onSocketNT , this , socket ) ;
572
572
} ;
573
573
@@ -580,7 +580,8 @@ function onSocketNT(req, socket) {
580
580
}
581
581
}
582
582
583
- ClientRequest . prototype . _deferToConnect = function ( method , arguments_ , cb ) {
583
+ ClientRequest . prototype . _deferToConnect = _deferToConnect ;
584
+ function _deferToConnect ( method , arguments_ , cb ) {
584
585
// This function is for calls that need to happen once the socket is
585
586
// connected and writable. It's an important promisy thing for all the socket
586
587
// calls that happen either now (when a socket is assigned) or
@@ -596,7 +597,7 @@ ClientRequest.prototype._deferToConnect = function(method, arguments_, cb) {
596
597
cb ( ) ;
597
598
}
598
599
599
- var onSocket = function ( ) {
600
+ var onSocket = function onSocket ( ) {
600
601
if ( self . socket . writable ) {
601
602
callSocketMethod ( ) ;
602
603
} else {
@@ -609,9 +610,9 @@ ClientRequest.prototype._deferToConnect = function(method, arguments_, cb) {
609
610
} else {
610
611
onSocket ( ) ;
611
612
}
612
- } ;
613
+ }
613
614
614
- ClientRequest . prototype . setTimeout = function ( msecs , callback ) {
615
+ ClientRequest . prototype . setTimeout = function setTimeout ( msecs , callback ) {
615
616
if ( callback ) this . once ( 'timeout' , callback ) ;
616
617
617
618
var self = this ;
@@ -644,21 +645,21 @@ ClientRequest.prototype.setTimeout = function(msecs, callback) {
644
645
return this ;
645
646
} ;
646
647
647
- ClientRequest . prototype . setNoDelay = function ( ) {
648
+ ClientRequest . prototype . setNoDelay = function setNoDelay ( ) {
648
649
const argsLen = arguments . length ;
649
650
const args = new Array ( argsLen ) ;
650
651
for ( var i = 0 ; i < argsLen ; i ++ )
651
652
args [ i ] = arguments [ i ] ;
652
653
this . _deferToConnect ( 'setNoDelay' , args ) ;
653
654
} ;
654
- ClientRequest . prototype . setSocketKeepAlive = function ( ) {
655
+ ClientRequest . prototype . setSocketKeepAlive = function setSocketKeepAlive ( ) {
655
656
const argsLen = arguments . length ;
656
657
const args = new Array ( argsLen ) ;
657
658
for ( var i = 0 ; i < argsLen ; i ++ )
658
659
args [ i ] = arguments [ i ] ;
659
660
this . _deferToConnect ( 'setKeepAlive' , args ) ;
660
661
} ;
661
662
662
- ClientRequest . prototype . clearTimeout = function ( cb ) {
663
+ ClientRequest . prototype . clearTimeout = function clearTimeout ( cb ) {
663
664
this . setTimeout ( 0 , cb ) ;
664
665
} ;
0 commit comments