Fix the issue where polling would die after a certain period

I'm now pretty confident this was down to Random.nextInt occasionally returning 0, resulting in the scheduler trying to schedule something in 0 milliseconds time and barfing.