MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / hangup

Method hangup

net/TcpClient.cpp:149–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void TcpClientImpl::hangup() {
150 active_connections_.clear();
151 targets_.clear();
152 is_closing_ = true;
153 ref_cnt_--;
154 for (auto &it : out_queries_) {
155 td::actor::send_closure(it.second.get(), &TcpOutboundQuery::set_error,
156 td::Status::Error(ton::ErrorCode::cancelled, "hangup"));
157 }
158 try_stop();
159}
160
161void TcpClientImpl::try_stop() {
162 if (is_closing_ && ref_cnt_ == 0 && out_queries_.empty()) {

Callers

nothing calls this directly

Calls 2

clearMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected