Improve RequestActor td_ private field name.
This commit is contained in:
parent
616b0e6d6f
commit
2f1821a6c4
@ -26,7 +26,7 @@ template <class T = Unit>
|
||||
class RequestActor : public Actor {
|
||||
public:
|
||||
RequestActor(ActorShared<Td> td_id, uint64 request_id)
|
||||
: td_id_(std::move(td_id)), td(td_id_.get().get_actor_unsafe()), request_id_(request_id) {
|
||||
: td_id_(std::move(td_id)), td_(td_id_.get().get_actor_unsafe()), request_id_(request_id) {
|
||||
}
|
||||
|
||||
void loop() override {
|
||||
@ -65,8 +65,8 @@ class RequestActor : public Actor {
|
||||
auto error = future_.move_as_error();
|
||||
if (error == Status::Error<FutureActor<T>::HANGUP_ERROR_CODE>()) {
|
||||
// dropping query due to lost authorization or lost promise
|
||||
// td may be already closed, so we should check is auth_manager_ is empty
|
||||
bool is_authorized = td->auth_manager_ && td->auth_manager_->is_authorized();
|
||||
// Td may be already closed, so we should check is auth_manager_ is empty
|
||||
bool is_authorized = td_->auth_manager_ && td_->auth_manager_->is_authorized();
|
||||
if (is_authorized) {
|
||||
LOG(ERROR) << "Promise was lost";
|
||||
do_send_error(Status::Error(500, "Query can't be answered due to a bug in TDLib"));
|
||||
@ -101,7 +101,7 @@ class RequestActor : public Actor {
|
||||
|
||||
protected:
|
||||
ActorShared<Td> td_id_;
|
||||
Td *td;
|
||||
Td *td_;
|
||||
|
||||
void send_result(tl_object_ptr<td_api::Object> &&result) {
|
||||
send_closure(td_id_, &Td::send_result, request_id_, std::move(result));
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user