Skip to content

the connection.handshake.address object is sometimes undefined #1042

@thekiur

Description

@thekiur
io.sockets.on('connection', function(connection) {
  console.log(
    connection.handshake, // always present
    connection.handshake.address, // sometimes undefined
    connection.handshake.address.address // sometimes ReferenceError
  );
});

Thats pretty much it.
Im expecting connection.handshake.address.address to contain the IP address related to the client, but i sometimes randomly get a ReferenceError there, as connection.handshake.address seems to be undefined.

Node 0.8.x
Socket.IO latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions