Allow timeout to be disabled, because it makes it impossible to detect EOF.