Connections creation debug

GitOrigin-RevId: 1f906a0c00464ff7bdfcfc41932b39733bab6780
This commit is contained in:
Arseny Smirnov 2018-11-20 13:09:52 +04:00
parent b6e8be94c6
commit fffe644aaa
3 changed files with 6 additions and 1 deletions

View File

@ -648,6 +648,9 @@ class CliClient final : public Actor {
case td_api::updateFile::ID: case td_api::updateFile::ID:
on_get_file(*static_cast<const td_api::updateFile *>(result.get())->file_); on_get_file(*static_cast<const td_api::updateFile *>(result.get())->file_);
break; break;
case td_api::updateConnectionState::ID:
LOG(WARNING) << to_string(result);
break;
} }
} }

View File

@ -1106,7 +1106,8 @@ void ConnectionCreator::client_add_connection(size_t hash, Result<unique_ptr<mtp
client.checking_connections--; client.checking_connections--;
} }
if (r_raw_connection.is_ok()) { if (r_raw_connection.is_ok()) {
VLOG(connections) << "Add ready connection " << r_raw_connection.ok().get() << " for " << tag("client", hash); VLOG(connections) << "Add ready connection " << r_raw_connection.ok().get() << " for "
<< tag("client", format::as_hex(hash));
client.backoff.clear(); client.backoff.clear();
client.ready_connections.push_back(std::make_pair(r_raw_connection.move_as_ok(), Time::now_cached())); client.ready_connections.push_back(std::make_pair(r_raw_connection.move_as_ok(), Time::now_cached()));
} }

View File

@ -966,6 +966,7 @@ void Session::connection_open_finish(ConnectionInfo *info,
} }
} }
auto name = PSTRING() << get_name() << "::Connect::" << mode_name << "::" << raw_connection->debug_str_; auto name = PSTRING() << get_name() << "::Connect::" << mode_name << "::" << raw_connection->debug_str_;
LOG(INFO) << "connection_open_finish: " << name;
info->connection = info->connection =
make_unique<mtproto::SessionConnection>(mode, std::move(raw_connection), &auth_data_, DhCache::instance()); make_unique<mtproto::SessionConnection>(mode, std::move(raw_connection), &auth_data_, DhCache::instance());
if (is_main_) { if (is_main_) {