e13b602 ("Avoid using pthread_cancel") introduced a bogus termination test, this fixes it. Fixes #572
e13b602