Add timeout before socket connection