diff --git a/src/Process/InstanceRegistrarProcess.php b/src/Process/InstanceRegistrarProcess.php index 5ff34a0..e059b89 100644 --- a/src/Process/InstanceRegistrarProcess.php +++ b/src/Process/InstanceRegistrarProcess.php @@ -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) {