We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93744ca commit 79e1a22Copy full SHA for 79e1a22
lib/OpenCloud/LoadBalancer/Resource/LoadBalancer.php
@@ -246,7 +246,11 @@ public function addNodes()
246
$requests = array();
247
248
foreach ($this->nodes as $node) {
249
- $requests[] = $this->getClient()->post($node->getUrl(), self::getJsonHeader(), $node->createJson());
+ // Only add the node if it is new
250
+ if (null === $node->getId()) {
251
+ $json = json_encode($node->createJson());
252
+ $requests[] = $this->getClient()->post($node->getUrl(), self::getJsonHeader(), $json);
253
+ }
254
}
255
256
return $this->getClient()->send($requests);
0 commit comments