nixmc/pusher-d3-demo — pull request #1 by swinton (2012-04-22 13:39:51+00:00)
Title: The mystery of 102

Got rid of the global count, in an effort to solve the mystery of 102, thinking it might be some weird corruption of state when 2 things update count at once, which I think was possible due to the way you're using Timers.

This version uses a separate process to handle the tweet stream, with a shared count between the tweet process and the main process (which pushes the total to Pusher every minute).

STILL seeing 102 though!!

Did a little bit more debugging and saw 102 appearing when reading the total every half second. Very odd.

Anyway, here's my code. Feel free to merge, I think it's a better model, now that the various concerns are separated, should hopefully be easier to debug.