Skip to content

Commit

Permalink
fixing peer startup race
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jul 1, 2019
1 parent 775f1af commit bfc1f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion node/src/Peerage.java
Expand Up @@ -345,7 +345,7 @@ public PeerageMaintThread()
setDaemon(true);
}

long last_learn_time = System.currentTimeMillis();
long last_learn_time = 0L;
long save_peer_time = System.currentTimeMillis();

public void run()
Expand Down
7 changes: 4 additions & 3 deletions node/src/SnowBlossomNode.java
Expand Up @@ -81,9 +81,9 @@ public SnowBlossomNode(Config config)
loadUtxoDB();
loadWidgets();

startWidgets();

startServices();

startWidgets();
}

public void stop()
Expand Down Expand Up @@ -113,6 +113,7 @@ private void loadWidgets()

private void startWidgets()
{
logger.info("Widget start");
peerage.start();
new TimeWatcher().start();
}
Expand Down Expand Up @@ -175,9 +176,9 @@ private void startServices()
}
}


service_ports = ImmutableList.copyOf(ports);
tls_service_ports = ImmutableList.copyOf(tls_ports);
logger.info("Ports: " + service_ports + " " + tls_service_ports);

user_service.start();
}
Expand Down

0 comments on commit bfc1f8a

Please sign in to comment.