Try to connect for a maximum of 5 seconds.