@@ -738,7 +738,7 @@ function connectionListenerInternal(server, socket) {
738
738
socket . setEncoding = socketSetEncoding ;
739
739
740
740
// We only consume the socket if it has never been consumed before.
741
- if ( socket . _handle && socket . _handle . isStreamBase &&
741
+ if ( socket . _handle ? .isStreamBase &&
742
742
! socket . _handle . _consumed ) {
743
743
parser . _consumed = true ;
744
744
socket . _handle . _consumed = true ;
@@ -783,7 +783,7 @@ function socketOnDrain(socket, state) {
783
783
}
784
784
785
785
function socketOnTimeout ( ) {
786
- const req = this . parser && this . parser . incoming ;
786
+ const req = this . parser ? .incoming ;
787
787
const reqTimeout = req && ! req . complete && req . emit ( 'timeout' , this ) ;
788
788
const res = this . _httpMessage ;
789
789
const resTimeout = res && res . emit ( 'timeout' , this ) ;
@@ -918,7 +918,7 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) {
918
918
prepareError ( ret , parser , d ) ;
919
919
debug ( 'parse error' , ret ) ;
920
920
socketOnError . call ( socket , ret ) ;
921
- } else if ( parser . incoming && parser . incoming . upgrade ) {
921
+ } else if ( parser . incoming ? .upgrade ) {
922
922
// Upgrade or CONNECT
923
923
const req = parser . incoming ;
924
924
debug ( 'SERVER upgrade or connect' , req . method ) ;
@@ -963,7 +963,7 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) {
963
963
964
964
function clearIncoming ( req ) {
965
965
req = req || this ;
966
- const parser = req . socket && req . socket . parser ;
966
+ const parser = req . socket ? .parser ;
967
967
// Reset the .incoming property so that the request object can be gc'ed.
968
968
if ( parser && parser . incoming === req ) {
969
969
if ( req . readableEnded ) {
@@ -1180,7 +1180,7 @@ function onSocketResume() {
1180
1180
}
1181
1181
1182
1182
function onSocketPause ( ) {
1183
- if ( this . _handle && this . _handle . reading ) {
1183
+ if ( this . _handle ? .reading ) {
1184
1184
this . _handle . reading = false ;
1185
1185
this . _handle . readStop ( ) ;
1186
1186
}
0 commit comments