Permalink
Browse files

When registering the instances that is fetched from the replica durin…

…g the startup, the registration incorrectly registers the instance with a expiration duration of -1 seconds. causing the instances to expire immediately after the expiration task runs. The registration should register the instances with the default duration of 90 seconds.
  • Loading branch information...
1 parent e834abe commit 63f9b68c9ffe3eee183601c08ac5eedaf3fd00c3 Karthik Ranganathan committed Sep 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 eureka-core/src/main/java/com/netflix/eureka/PeerAwareInstanceRegistry.java
@@ -316,7 +316,7 @@ public int syncUp() {
for (Application app : apps.getRegisteredApplications()) {
for (InstanceInfo instance : app.getInstances()) {
try {
- register(instance, -1, true);
+ register(instance, instance.getLeaseInfo().getDurationInSecs(), true);
count++;
} catch (Throwable t) {
logger.error("During DS init copy", t);

0 comments on commit 63f9b68

Please sign in to comment.