From 502cef78e80c628cdba7272377edc55771988ec1 Mon Sep 17 00:00:00 2001 From: Mikhail Yarmaliuk Date: Mon, 21 Sep 2020 14:11:18 +0300 Subject: [PATCH] Fix expand srv dns record. Remove .srv suffix from domain --- composer.json | 2 +- src/Microservice.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4ef3cb7..c427423 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Microservice.php b/src/Microservice.php index 5beaaae..cf17e7b 100644 --- a/src/Microservice.php +++ b/src/Microservice.php @@ -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');