Skip to content

Commit

Permalink
Update InstanceRegistrarProcess.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kylin987 committed Dec 8, 2023
1 parent 182568e commit db0d448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Process/InstanceRegistrarProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function _heartbeat(string $name): void
$option['ephemeral'] = (is_string($option['ephemeral']) ? filter_var($option['ephemeral'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) : (bool) $option['ephemeral'] );
}
// 仅对非永久实例进行心跳
if (!($option['ephemeral'] ?? false)) {
if ($option['ephemeral'] ?? false) {
$this->heartbeatTimers[$name] = Timer::add($this->heartbeat, function () use ($name) {
list($serviceName, $ip, $port, $option) = $this->instanceRegistrars[$name];
if (isset($option['ephemeral'])) {
Expand Down

0 comments on commit db0d448

Please sign in to comment.