Set timeout before trying to connect