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

handle killed phantomjs process gracefully #37

Merged
merged 1 commit into from
Aug 6, 2015
Merged

Conversation

domasx2
Copy link
Contributor

@domasx2 domasx2 commented Jul 18, 2015

Hi,

I'm trying to use this for https://github.com/Producters/express-crawler-snapshots. I need it to be fairly robust and handle phantomjs child process crashing or being killed.

I encountered and fixed two issues that pop up when a phantomjs process dies:

  • ping timeout is never cleared. Callback tries to write to already closed stdin socket and crashes the process
  • pending deffereds are not rejected, leaving the callers hanging

jhnns added a commit that referenced this pull request Aug 6, 2015
handle killed phantomjs process gracefully
@jhnns jhnns merged commit 8543b49 into peerigon:master Aug 6, 2015
@jhnns
Copy link
Member

jhnns commented Aug 6, 2015

Awesome, thx! I haven't thought about the child process being killed autonomously...
Also related to #35

@jhnns
Copy link
Member

jhnns commented Aug 6, 2015

I'll just do some refactoring...

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

Successfully merging this pull request may close these issues.

None yet

2 participants