From 2b13a04f495a9e81bbf4665ea552e4cbfe766e2a Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 22 Jan 2014 10:01:39 -0500 Subject: [PATCH] Pinging. --- peer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/peer.cpp b/peer.cpp index 6a32c00e3..64998fd50 100644 --- a/peer.cpp +++ b/peer.cpp @@ -49,10 +49,12 @@ int peerTest(int argc, char** argv) if (!remoteHost.empty()) pn.connect(remoteHost, remotePort); - while (true) + for (int i = 0; ; ++i) { usleep(100000); pn.process(); + if (!(i % 10)) + pn.pingAll(); } return 0;