baudehlo/node-phantom-simple — pull request #21 by giakki (2014-03-06 16:50:25+00:00)
Title: Fix possible ECONNRESET

Hi,
I am randomly (~2% of the time) getting a `Poll Request error: Error: read ECONNRESET`.

To my understanding, the issue could be that the poll function request fails when `phantom.kill` is executed, and its error callback could be fired before `phantom.once('exit'...`, resulting in the "dead" variable still being false.

This fix solves the problem on my end!