Fix one thread timeout logic

This should fix the seemingly-random failures observed on the FreeBSD
buildbot.