File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -333,13 +333,13 @@ exports.Socket = class TCPSocket extends Duplex {
333333 return
334334 }
335335
336+ this . _localAddress = binding . address ( this . _handle , true )
337+ this . _remoteAddress = binding . address ( this . _handle , false )
338+
336339 this . _state |= constants . state . CONNECTED
337340 this . _state &= ~ constants . state . CONNECTING
338341 this . _continueOpen ( )
339342
340- this . _localAddress = binding . address ( this . _handle , true )
341- this . _remoteAddress = binding . address ( this . _handle , false )
342-
343343 this . emit ( 'connect' )
344344 }
345345
@@ -595,11 +595,11 @@ exports.Server = class TCPServer extends EventEmitter {
595595 try {
596596 binding . accept ( this . _handle , socket . _handle )
597597
598- socket . _state |= constants . state . CONNECTED
599-
600598 socket . _localAddress = binding . address ( socket . _handle , true )
601599 socket . _remoteAddress = binding . address ( socket . _handle , false )
602600
601+ socket . _state |= constants . state . CONNECTED
602+
603603 this . _connections . add ( socket )
604604
605605 if ( this . _keepAlive ) socket . setKeepAlive ( this . _keepAlive , this . _keepAliveInitialDelay )
You can’t perform that action at this time.
0 commit comments