Add auth_key_id to error messages.

This commit is contained in:
levlam 2023-08-20 21:00:42 +03:00
parent 4d1d22d6f4
commit 0e9b4be29f
2 changed files with 10 additions and 7 deletions

View File

@ -518,10 +518,11 @@ Status SessionConnection::on_slice_packet(const MsgInfo &info, Slice packet) {
}
auto get_update_description = [&] {
return PSTRING() << "update from " << get_name() << " active for " << (Time::now() - created_at_)
<< " seconds in container " << container_id_ << " from session " << auth_data_->get_session_id()
<< " with message_id " << info.message_id << ", main_message_id = " << main_message_id_
<< ", seq_no = " << info.seq_no << " and original size = " << info.size;
return PSTRING() << "update from " << get_name() << " with auth key " << auth_data_->get_auth_key().id()
<< " active for " << (Time::now() - created_at_) << " seconds in container " << container_id_
<< " from session " << auth_data_->get_session_id() << " with message_id " << info.message_id
<< ", main_message_id = " << main_message_id_ << ", seq_no = " << info.seq_no
<< " and original size = " << info.size;
};
// It is an update... I hope.

View File

@ -574,7 +574,8 @@ Status Session::on_pong() {
Timestamp::at(current_info_->created_at_ + MIN_CONNECTION_ACTIVE).is_in_past()) {
Status status;
if (!unknown_queries_.empty()) {
status = Status::Error(PSLICE() << "No state info for " << unknown_queries_.size() << " queries for "
status = Status::Error(PSLICE() << "No state info for " << unknown_queries_.size() << " queries from auth key "
<< auth_data_.get_auth_key().id() << " for "
<< format::as_time(Time::now() - current_info_->created_at_));
}
if (!sent_queries_list_.empty()) {
@ -582,8 +583,9 @@ Status Session::on_pong() {
auto query = Query::from_list_node(it);
if (Timestamp::at(query->sent_at_ + MAX_QUERY_TIMEOUT).is_in_past()) {
if (status.is_ok()) {
status = Status::Error(PSLICE() << "No answer for " << query->query << " for "
<< format::as_time(Time::now() - query->sent_at_));
status =
Status::Error(PSLICE() << "No answer from auth key " << auth_data_.get_auth_key().id() << " for "
<< query->query << " for " << format::as_time(Time::now() - query->sent_at_));
}
query->ack = false;
} else {