From 3f1c768e2d5b5e51dec08499d6a877220f33d7a6 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 3 Aug 2018 13:52:09 -0400 Subject: rename handler_bind and move to type.h --- test/bench_network.cpp | 4 ++-- test/test_network.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/bench_network.cpp b/test/bench_network.cpp index bd31ee0..1185c0d 100644 --- a/test/bench_network.cpp +++ b/test/bench_network.cpp @@ -89,7 +89,7 @@ struct MyNet: public MsgNetworkByteOp { }), nrecv(0) { /* message handler could be a bound method */ - reg_handler(salticidae::handler_bind( + reg_handler(salticidae::generic_bind( &MyNet::on_receive_bytes, this, _1, _2)); if (stat_timeout > 0) ev_period_stat.add_with_timeout(0); @@ -123,7 +123,7 @@ struct MyNet: public MsgNetworkByteOp { } void on_teardown() override { auto net = get_net(); - net->ev_period_send = Event(); + net->ev_period_send.clear(); printf("[%s] Disconnected, retrying.\n", net->name.c_str()); /* try to reconnect to the same address */ net->connect(get_addr()); diff --git a/test/test_network.cpp b/test/test_network.cpp index e5d2b1d..c4fe2e2 100644 --- a/test/test_network.cpp +++ b/test/test_network.cpp @@ -86,7 +86,7 @@ struct MyNet: public MsgNetworkByteOp { name(name), peer(peer) { /* message handler could be a bound method */ - reg_handler(salticidae::handler_bind( + reg_handler(salticidae::generic_bind( &MyNet::on_receive_hello, this, _1, _2)); reg_conn_handler([this](ConnPool::Conn &conn) { -- cgit v1.2.3-70-g09d2