-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Object doesn't support property or method 'packet' #489
Comments
Which version of IE? Which transports are you using? What does your client code look like? |
Tried websockets and xhr-pooling: socket.on('connect', function connected() { console.log('Connected to remote host'); setLinkState(1); toggleControlButtons(); statsIntervalHandle = setInterval(socket.emit, 3000, "get_stats", {"value": "all"}); }); socket.on('stats', function() { var outputArr = Array.prototype.slice.call(arguments), len = outputArr.length; while(len--) { console.log('got stats', outputArr[len]); setStats(outputArr[len]); } }); Server side: socket.on("get_stats", function(data) { switch(data['value']) { case 'memory_usage': socket.emit("stats", getMemoryUsage(true)); break; case 'all': default: socket.emit("stats", getMemoryUsage(true), { "mysql_rows": DBrows.length, "rules_in_memory": rules.length, "stocks_in_memory": stockNames.length, "open_prices": Object.keys(startPrices).length, "current_prices": Object.keys(currentPrices).length }); } }); |
Looks like the issue is in setInterval (setTimeout will do the same) of my code: Code executed by setTimeout() is run in a separate execution context to the function from which it was called. As a consequence, the this keyword for the called function will be set to the window (or global) object, it will not be the same as the this value for the function that called setTimeout. https://developer.mozilla.org/en/DOM/window.setTimeout#The_'this'_problem |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Got this error on chrome and IE (haven't test others):
IE:
since yesterday, when updated to 0.7.11
same with 0.8.0
On server's console don't see any errors
The text was updated successfully, but these errors were encountered: