fix for auto reconnect

This commit is contained in:
qicosmos
2020-09-25 11:11:44 +08:00
parent 3dc8332d3e
commit c1ef668adb
+2 -1
View File
@@ -124,6 +124,7 @@ namespace rest_rpc {
void enable_auto_reconnect(bool enable = true) {
enable_reconnect_ = enable;
reconnect_cnt_ = std::numeric_limits<int>::max();
}
void enable_auto_heartbeat(bool enable = true) {
@@ -655,7 +656,7 @@ namespace rest_rpc {
}
if (enable_reconnect_) {
async_connect();
async_reconnect();
}
}