Skip to content

Commit

Permalink
Cache remote address in handshake since it might be lost later.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Kovanen committed Jul 19, 2014
1 parent 588af64 commit 15afd3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function Socket (id, server, transport, req) {
this.packetsFn = [];
this.sentCallbackFn = [];
this.request = req;


// Cache IP since it might not be in the req later
this.remoteAddress = req.connection.remoteAddress;

this.checkIntervalTimer = null;
this.upgradeTimeoutTimer = null;
this.pingTimeoutTimer = null;
Expand Down

0 comments on commit 15afd3e

Please sign in to comment.