tcpclient : generate an exception if the DNS has an error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4037 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -56,7 +56,10 @@ class tcpclient
|
||||
$i = 0;
|
||||
while (empty ($this->ipv4) && empty ($this->ipv6) && $i < 10)
|
||||
{
|
||||
$nsRecords = dns_get_record ($ipOrName, DNS_AAAA + DNS_A + DNS_CNAME);
|
||||
$nsRecords = @dns_get_record ($ipOrName, DNS_AAAA + DNS_A + DNS_CNAME);
|
||||
if ($nsRecords === false)
|
||||
throw new \Exception ("Can not find the IP for $ipOrName : ".
|
||||
"DNS Error", 500);
|
||||
foreach ($nsRecords as $val)
|
||||
{
|
||||
if ($val["type"] === "CNAME")
|
||||
|
||||
Reference in New Issue
Block a user