Skip to content

Commit cb01790

Browse files
committed
Optimize TCP Ping process
1 parent 649850b commit cb01790

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tcping.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ int tcping(nodeInfo *node)
8181
draw_progress(loopcounter, node->rawPing);
8282
loopcounter++;
8383
if(loopcounter < times_to_ping)
84-
sleep(1000);
84+
{
85+
if(retVal != 1)
86+
sleep(1000); //passed, sleep longer
87+
else
88+
sleep(200); //not passed, sleep shorter
89+
}
90+
8591
}
8692
cerr<<endl;
8793
float pingval = 0.0;

0 commit comments

Comments
 (0)