fix job code in extreme circumstances.
fix job code in extreme circumstances.

if we went through an entire file without getting a single message, the
previous version would deadlock. Should be fixed now

DanielMorsing/gonzbee