Open famik opened 4 years ago
写个死循环不断跑,到了一定时间,必定崩溃:
void test() { try { rpc_client client("127.0.0.1", 9000); bool r = client.connect(); if (!r) { std::cout << "connect timeout" << std::endl; return; } { auto result = client.call<2000, std::string>("test", "Hello"); std::cout << "test result: " << result << std::endl; } } catch (const std::exception & e) { std::cout << e.what() << std::endl; } } int main(int argc, const char * argv[]) { for (;;) { test(); std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } return 0; }
我晚点看一下。
问题已经修复,见#16 取最新代码即可。
写个死循环不断跑,到了一定时间,必定崩溃: