-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handshakeData.address is undefined, "version": "0.9.16" #1376
Comments
In Primus, which wraps socket.io i use: https://github.com/primus/primus/blob/master/forwarded.js to extract IP address information. Might be useful for you as well. |
What the current handshakeData prototype is doing, what I am asking is whether there is another source of the address, as per my previous post, it seems that yours is doing what I suggest. Manager.prototype.handshakeData = function (data) { if (connection.remoteAddress) { |
Subscribing/unsubscribing for a lot of different event types could lead to a memory leak. See sindresorhus/component-emitter@aa2e57a Diff: sindresorhus/component-emitter@1.2.1...1.3.0
In the callback for io.set("authorization", fn(handshakeData, callback){...});
The handshakeData.address is undefined in some logged connection requests.
In Manager.prototype.handshakeData, should there be a check for data.request.socket.address?
var connection = data.request.connection,
socket = data.request.socket
...
else if (socket && socket.remoteAddress) {
connectionAddress = {
address: socket.remoteAddress
, port: socket.remotePort
};
}
The text was updated successfully, but these errors were encountered: