Skip to content

Commit

Permalink
注册服务时enabled的值转字符串
Browse files Browse the repository at this point in the history
  • Loading branch information
kylin987 committed Dec 11, 2023
1 parent 77b79a5 commit a7f824b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Process/InstanceRegistrarProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function onWorkerStart(Worker $worker)
foreach ($instanceRegistrars as $name => $instanceRegistrar){
// 拆解配置
list($serviceName, $ip, $port, $option) = $instanceRegistrar;
$option['enabled'] = is_bool($option['enabled']) ? ($option['enabled'] ? 'true' : 'false') : $option['enabled'];
// 注册
$promises[] = $this->client->instance->registerAsync($ip, $port, $serviceName, $option)
->then(function (ResponseInterface $response) use ($instanceRegistrar, $name) {
Expand Down

0 comments on commit a7f824b

Please sign in to comment.