diff options
author | Determinant <[email protected]> | 2018-11-19 00:54:56 -0500 |
---|---|---|
committer | Determinant <[email protected]> | 2018-11-19 00:54:56 -0500 |
commit | 4fdac38ad5796cae03f827670655efd79d953699 (patch) | |
tree | b20baed058ce71b7498b7b2a21575b18b0b84efb /test/bench_network.cpp | |
parent | 35ffa2c1e5c7fba06c52e2c20aff2aac910921d5 (diff) |
fix bug in remove_conn
Diffstat (limited to 'test/bench_network.cpp')
-rw-r--r-- | test/bench_network.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/bench_network.cpp b/test/bench_network.cpp index 61307e1..b0856b8 100644 --- a/test/bench_network.cpp +++ b/test/bench_network.cpp @@ -83,7 +83,7 @@ struct MyNet: public MsgNetworkByteOp { name(name), peer(peer), ev_period_stat(ec, -1, [this, stat_timeout](int, short) { - printf("%.2f mps\n", nrecv / (double)stat_timeout); + SALTICIDAE_LOG_INFO("%.2f mps\n", nrecv / (double)stat_timeout); nrecv = 0; ev_period_stat.add_with_timeout(stat_timeout, 0); }), @@ -154,10 +154,12 @@ int main() { sigaction(SIGINT, &sa, NULL); /* test two nodes */ MyNet alice(ec, "Alice", bob_addr, 10); + alice.start(); alice.listen(alice_addr); std::thread bob_thread([]() { salticidae::EventContext ec; MyNet bob(ec, "Bob", alice_addr); + bob.start(); bob.connect(alice_addr); try { ec.dispatch(); |