mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 16:40:48 +08:00
fix for auto reconnect
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user