Skip to content
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

handling socket errors, avoiding instance die #6

Closed
iamyellow opened this issue Apr 13, 2011 · 0 comments
Closed

handling socket errors, avoiding instance die #6

iamyellow opened this issue Apr 13, 2011 · 0 comments

Comments

@iamyellow
Copy link

Hi!

First of all, thanks for your (good) work! Really helpful, save hours of work for me :D
For some reason my network (I'm not sure what, but I guess: Internet provider, router...) or maybe the server's OS... something breaks my socket opened connections if no activity is detected. When it happens node-apn makes node instance die.
However, the solution is quite simple: just catch the error:

self.socket.on('error', function(data) { self.socket = undefined; });

Obviously, that piece of code can be improved ;)

Thanks again!

@argon argon closed this as completed in 8875229 Apr 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants