Fix testProxy.
GitOrigin-RevId: fcce1611113bec089ac3ca20df56eba85895a753
This commit is contained in:
parent
410d81c55f
commit
4a2b76e1ef
@ -55,7 +55,7 @@ void HandshakeActor::return_connection(Status status) {
|
||||
CHECK(!raw_connection_promise_);
|
||||
return;
|
||||
}
|
||||
if (status.is_error()) {
|
||||
if (status.is_error() && !raw_connection->debug_str_.empty()) {
|
||||
status = Status::Error(status.code(), PSLICE() << status.message() << " : " << raw_connection->debug_str_);
|
||||
}
|
||||
Scheduler::unsubscribe(raw_connection->get_poll_info().get_pollable_fd_ref());
|
||||
|
@ -617,7 +617,7 @@ class TestProxyRequest : public RequestOnceActor {
|
||||
}
|
||||
void on_handshake_connection(Result<unique_ptr<mtproto::RawConnection>> r_raw_connection) {
|
||||
if (r_raw_connection.is_error()) {
|
||||
promise_.set_error(Status::Error(400, r_raw_connection.move_as_error().public_message()));
|
||||
return promise_.set_error(Status::Error(400, r_raw_connection.move_as_error().public_message()));
|
||||
}
|
||||
}
|
||||
void on_handshake(Result<unique_ptr<mtproto::AuthKeyHandshake>> r_handshake) {
|
||||
@ -625,13 +625,14 @@ class TestProxyRequest : public RequestOnceActor {
|
||||
return;
|
||||
}
|
||||
if (r_handshake.is_error()) {
|
||||
promise_.set_error(Status::Error(400, r_handshake.move_as_error().public_message()));
|
||||
return promise_.set_error(Status::Error(400, r_handshake.move_as_error().public_message()));
|
||||
}
|
||||
|
||||
auto handshake = r_handshake.move_as_ok();
|
||||
if (!handshake->is_ready_for_finish()) {
|
||||
promise_.set_error(Status::Error(400, "Handshake is not ready"));
|
||||
}
|
||||
promise_.set_value(Unit());
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -131,7 +131,7 @@ void Wget::start_up() {
|
||||
}
|
||||
|
||||
void Wget::timeout_expired() {
|
||||
on_error(Status::Error("Timeout expired"));
|
||||
on_error(Status::Error("Response timeout expired"));
|
||||
}
|
||||
|
||||
void Wget::tear_down() {
|
||||
|
Loading…
Reference in New Issue
Block a user