php-long-polling icon indicating copy to clipboard operation
php-long-polling copied to clipboard

Just a question

Open BobRay opened this issue 6 years ago • 1 comments

Since you are sending the previous modification time in every Ajax request but the first, why not have the PHP code echo the message, then die()?

If changes are missed, you could put the sleep() call in the code that writes the file content rather than in your loop.

BobRay avatar Jul 04 '18 18:07 BobRay

Hi Rob, to be honest I don't know why :) This project is some years old (5 i think) and I dont remember, BUT may it has to do with the die() / exit() you mentioned, as code that contains die()/exit() is hard to test in unit tets etc (as the tests will stop when you try to test code).

panique avatar Jul 04 '18 20:07 panique