Skip to content

Commit

Permalink
Fix expand srv dns record. Remove .srv suffix from domain
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Sep 21, 2020
1 parent b604961 commit 502cef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kakadu-dev/php-ijson-microservices",
"version": "1.2.0",
"version": "1.2.1",
"description": "Package for create microservice architecture based on PHP.",
"homepage": "https://github.com/kakadu-dev/php-ijson-microservices",
"type": "library",
Expand Down
2 changes: 1 addition & 1 deletion src/Microservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private function expandSrv(): void
}

$part = explode('://', $this->options['ijson']);
$srvRecords = dns_get_record($part[1], DNS_SRV);
$srvRecords = dns_get_record(preg_replace('/\.srv$/', '', $part[1]), DNS_SRV);

// Sort
$priority = array_column($srvRecords, 'pri');
Expand Down

0 comments on commit 502cef7

Please sign in to comment.