-
Notifications
You must be signed in to change notification settings - Fork 10.1k
If the socket is destroyed, node.js from 0.8.20 version will raise an error #1164
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
Conversation
|
Any comments on this ? Maybe is better to handle this exception directly on the packet function ? |
|
I'm not sure, if your error is the same as mine (some log information was helpful), but i encounter this kind of error too with Node 0.8.20 and latest Socket.IO, but only with IE 8 so far. With Chrome-based Browsers all is fine. Here is, was is logged after page reload. D:\Users\Max\Desktop\key2swap>node server.js timers.js:103 Any help was highly appreciated, as otherwise this app cannot be used on our sites, if it is not cross-browser stable. |
|
On 02/19/2013 04:36 PM, clubnite wrote:
I can reproduce it always on Chromium 24, Firefox 18, with xhr-polling. It is very important to use node.js 0.8.20, that is the version that You need also to emit something from the server to the client. The If you can't reproduce tell me and I can give you a backtrace on the go. Best regards, |
|
@clubnite: your backtrace looks like what my last commit (merged) fixed, please update your working copy, since I guess it could be so. The error I mean is when the server emitted something to the client, and still failing. (fixed by the commit on this pull request). However it would make sense to take care of this error at a lower level. |
|
Using node.js 0.8.20 with socket.io 0.9.13. |
|
Hi At RANDOM TIME and EVERYTIME by switching from a pad to the timeline page, error log : Doing your trick : Catching error in /lib/transports/xhr-polling.js at line 67 (this.response.write(data)), fixed it for me. WORK for me file : src/node_modules/socket.io/lib/transports/xhr-polling.js Find : And now for me, no more reboot of the etherpad server Ok, for now it work |
|
I can confirm that this is a reproducible error. I have a Phonegap app which runs a socket.io client. In the pause method which is called when the app is moved to the background I call disconnect() on the socket.io client. The server gets the disconnect message but by the time it sends the response back the client app has been moved to the background by the phone operating system and its connection has been cut. I was getting the error described in this thread 100% of the time in this situation, crashing the socket.io server app. I implemented the error catch inside lib/transports/xhr-polling.js as described by zendozerris and it resolves the issue. I would definitely recommend pulling a fix for this into socket.io. |
|
I can confirm this in IE 8 running node 0.8.20 and socket 0.9.13. Almost every single time I hard refresh with IE 8 I see this error on my server. I noticed a large reduction in these by wrapping a check around every emit I do, to ensure that there is a socket connected, but this isn't perfect and the disconnects still seem to error. |
|
True |
|
Is this issue fixed with the new version of node ? (v0.8.21) |
|
I had a very similar issue (not sure if it's the same one that you are having), but for me now it seems to be working much better. |
|
I can confirm this in IE 9 running node 0.8.20 and socket 0.9.13. Every refresh w/IE9 crashes my application, thankfully forever is there to rescue. events.js:71 |
|
Also getting a lot of these w/ this build: warn - Unable to serve file. EMFILE, open '/usr/home/me/node/blog/node_modules/socket.io/node_modules/socket.io-client/bin/../lib/transports/jsonp-polling.js' |
|
Seems to be fixed in node 0.8.21 |
If the socket is destroyed, node.js from 0.8.20 version will raise an error here.