Use ternary operator instead of the if-then-else clause for setting the timeout in the constructor.