exit when ip_connect() failed