mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-09-21 21:44:44 -04:00
Stop seed node after peer nodes in network stress test
Probably not really needed.
This commit is contained in:
parent
2881a3dd63
commit
84035ae658
1 changed files with 4 additions and 4 deletions
|
@ -233,14 +233,14 @@ public class NetworkStressTest {
|
||||||
/** A barrier to wait for concurrent shutdown of services. */
|
/** A barrier to wait for concurrent shutdown of services. */
|
||||||
final CountDownLatch shutdownLatch = new CountDownLatch((seedNode != null? 1 : 0) + peerNodes.size());
|
final CountDownLatch shutdownLatch = new CountDownLatch((seedNode != null? 1 : 0) + peerNodes.size());
|
||||||
|
|
||||||
// Stop the seed node.
|
|
||||||
if (seedNode != null) {
|
|
||||||
seedNode.shutDown(shutdownLatch::countDown);
|
|
||||||
}
|
|
||||||
// Stop peer nodes.
|
// Stop peer nodes.
|
||||||
for (P2PService peer : peerNodes) {
|
for (P2PService peer : peerNodes) {
|
||||||
peer.shutDown(shutdownLatch::countDown);
|
peer.shutDown(shutdownLatch::countDown);
|
||||||
}
|
}
|
||||||
|
// Stop the seed node.
|
||||||
|
if (seedNode != null) {
|
||||||
|
seedNode.shutDown(shutdownLatch::countDown);
|
||||||
|
}
|
||||||
// Wait for concurrent tasks to finish.
|
// Wait for concurrent tasks to finish.
|
||||||
shutdownLatch.await();
|
shutdownLatch.await();
|
||||||
print("all local nodes stopped");
|
print("all local nodes stopped");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue