Attempt to fix binlog_pmc_ bug in ConfigSession::HandshakeActor
GitOrigin-RevId: 6486e37b16a39c4088faa5a2aedc674e6feb2e89
This commit is contained in:
parent
f4bea9a891
commit
a569a1eac7
@ -1120,7 +1120,8 @@ void Session::create_gen_auth_key_actor(HandshakeId handshake_id) {
|
||||
info.actor_ = create_actor<detail::GenAuthKeyActor>(
|
||||
PSLICE() << get_name() << "::GenAuthKey", get_name(), std::move(info.handshake_),
|
||||
td::make_unique<AuthKeyHandshakeContext>(DhCache::instance(), shared_auth_data_->public_rsa_key()),
|
||||
PromiseCreator::lambda([self = actor_id(this)](Result<unique_ptr<mtproto::RawConnection>> r_connection) {
|
||||
PromiseCreator::lambda(
|
||||
[self = actor_id(this), guard = callback_](Result<unique_ptr<mtproto::RawConnection>> r_connection) {
|
||||
if (r_connection.is_error()) {
|
||||
if (r_connection.error().code() != 1) {
|
||||
LOG(WARNING) << "Failed to open connection: " << r_connection.error();
|
||||
@ -1129,9 +1130,9 @@ void Session::create_gen_auth_key_actor(HandshakeId handshake_id) {
|
||||
}
|
||||
send_closure(self, &Session::connection_add, r_connection.move_as_ok());
|
||||
}),
|
||||
PromiseCreator::lambda(
|
||||
[self = actor_shared(this, handshake_id + 1), handshake_perf = PerfWarningTimer("handshake", 1000.1)](
|
||||
Result<unique_ptr<mtproto::AuthKeyHandshake>> handshake) mutable {
|
||||
PromiseCreator::lambda([self = actor_shared(this, handshake_id + 1),
|
||||
handshake_perf = PerfWarningTimer("handshake", 1000.1),
|
||||
guard = callback_](Result<unique_ptr<mtproto::AuthKeyHandshake>> handshake) mutable {
|
||||
// later is just to avoid lost hangup
|
||||
send_closure_later(std::move(self), &Session::on_handshake_ready, std::move(handshake));
|
||||
}),
|
||||
|
Reference in New Issue
Block a user