fennb/phirehose — pull request #34 by stratiator (2013-04-17 13:38:41+00:00)
Title: call pcntl_signal_dispatch in consume to make the script able to handle posix signals

If running as a php daemon, sending a SIGTERM or any other signal which is not SIGKILL, execution stucks in consume method, because the while ($this->reconnect) loop.
A "Phirehose connection error occured: Socket disconnected" error raises, but the loop starts again.
Calling a pcntl_signal_dispatch allows the signal to be handled properly.