mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 16:40:48 +08:00
update
This commit is contained in:
@@ -407,8 +407,11 @@ void test_sub1() {
|
||||
std::thread thd1([&client, &stop] {
|
||||
while (true) {
|
||||
try {
|
||||
int r = client.call<int>("add", 2, 3);
|
||||
std::cout << "add result: " << r << "\n";
|
||||
if (client.has_connected()) {
|
||||
int r = client.call<int>("add", 2, 3);
|
||||
std::cout << "add result: " << r << "\n";
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
catch (const std::exception& ex) {
|
||||
|
||||
Reference in New Issue
Block a user