Skip to content

Commit

Permalink
feat: added a timeout to dig
Browse files Browse the repository at this point in the history
  • Loading branch information
SRWieZ committed Nov 21, 2024
1 parent 45a69cf commit 9dda3ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fetchers/DigFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private function fetchFrom(DnsProvider $provider, ?IpVersion $versionToResolve):
return null;
}

$cmd = sprintf('dig %s %s @%s +short', $provider->getRecordType(), $host, $nameServer);
$cmd = sprintf('dig %s %s @%s +short +time=1', $provider->getRecordType(), $host, $nameServer);
$response = shell_exec($cmd);

if (empty($response)) {
Expand Down

0 comments on commit 9dda3ba

Please sign in to comment.