tg_cli: fix "reset".

GitOrigin-RevId: f0c1522ac80d4ee65f4567a32ccf6ba87aa7f694
This commit is contained in:
levlam 2018-11-07 00:09:05 +03:00
parent 69d9173dcd
commit f005966752

View File

@ -563,6 +563,7 @@ class CliClient final : public Actor {
// LOG(INFO) << "on_result [" << generation << "][id=" << id << "] " << as_json_str; // LOG(INFO) << "on_result [" << generation << "][id=" << id << "] " << as_json_str;
if (generation != generation_) { if (generation != generation_) {
LOG(INFO) << "Drop unneded " << to_string(result);
return; return;
} }
@ -1206,7 +1207,7 @@ class CliClient final : public Actor {
} else if (op == "ra" || op == "destroy") { } else if (op == "ra" || op == "destroy") {
send_request(make_tl_object<td_api::destroy>()); send_request(make_tl_object<td_api::destroy>());
} else if (op == "reset") { } else if (op == "reset") {
init_td(); td_client_.reset();
} else if (op == "close_td") { } else if (op == "close_td") {
// send_request(make_tl_object<td_api::getCurrentState>()); // send_request(make_tl_object<td_api::getCurrentState>());
send_request(make_tl_object<td_api::close>()); send_request(make_tl_object<td_api::close>());