Skip to content

Commit

Permalink
Quick fix to issues socketio#313 to check if an address exists on a c…
Browse files Browse the repository at this point in the history
…onnection
  • Loading branch information
nyxtom committed Jun 29, 2011
1 parent d3d2a70 commit 3e0239e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,13 @@ Manager.prototype.handleHandshake = function (data, req, res) {
*/

Manager.prototype.handshakeData = function (data) {
var connectionAddress = null;
if (data.request.connection.address) {
connectionAddress = data.request.connection.address();
}
return {
headers: data.headers
, address: data.request.connection.address()
, address: connectionAddress
, time: (new Date).toString()
, xdomain: !!data.request.headers.origin
, secure: data.request.connection.secure
Expand Down

0 comments on commit 3e0239e

Please sign in to comment.