Fixed infinite loop bug in heartbeat on Pythin 2.6.
Fixed infinite loop bug in heartbeat on Pythin 2.6.

In Py2.6, threading.Event.wait() always returns None, even when the
event is set. I've added a check for event.is_set() to break out of the
loop.

http://docs.python.org/library/threading.html#threading.Event.wait

ox-it/humfrey,ox-it/humfrey,ox-it/humfrey