timeout is an int, so it wraps when the poll timeout is >2147ms. This happened in logger, resulting in poll never returning.