Skip to content

Commit

Permalink
Merge pull request #130 from yosefe/topic/iodemo-print-num-retries-int3
Browse files Browse the repository at this point in the history
TEST/IODEMO: Print connection retry count
  • Loading branch information
yosefe authored Apr 15, 2021
2 parents 012cca7 + c5b1b8f commit c359dec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/apps/iodemo/io_demo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1125,12 +1125,14 @@ class DemoClient : public P2pDemoCommon {
void connect_succeed(size_t server_index)
{
server_info_t &server_info = _server_info[server_index];
long attempts = server_info.retry_count + 1;

server_info.retry_count = 0;
server_info.prev_connect_time = 0.;
_server_index_lookup[server_info.conn] = server_index;
active_servers_add(server_index);
LOG << "Connected to " << server_name(server_index);
LOG << "Connected to " << server_name(server_index) << " after "
<< attempts << " attempts";
}

void connect_failed(size_t server_index) {
Expand Down

0 comments on commit c359dec

Please sign in to comment.