|
|
@ -187,11 +187,7 @@ void ChaoticGoodServerListener::ActiveConnection::NewConnectionID() { |
|
|
|
connection_id_, std::make_shared<InterActivityLatch<PromiseEndpoint>>()); |
|
|
|
connection_id_, std::make_shared<InterActivityLatch<PromiseEndpoint>>()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ChaoticGoodServerListener::ActiveConnection::Done( |
|
|
|
void ChaoticGoodServerListener::ActiveConnection::Done() { |
|
|
|
absl::optional<absl::string_view> error) { |
|
|
|
|
|
|
|
if (error.has_value()) { |
|
|
|
|
|
|
|
LOG(ERROR) << "ActiveConnection::Done:" << this << " " << *error; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Can easily be holding various locks here: bounce through EE to ensure no
|
|
|
|
// Can easily be holding various locks here: bounce through EE to ensure no
|
|
|
|
// deadlocks.
|
|
|
|
// deadlocks.
|
|
|
|
listener_->event_engine_->Run([self = Ref()]() { |
|
|
|
listener_->event_engine_->Run([self = Ref()]() { |
|
|
@ -387,13 +383,15 @@ auto ChaoticGoodServerListener::ActiveConnection::HandshakingState:: |
|
|
|
void ChaoticGoodServerListener::ActiveConnection::HandshakingState:: |
|
|
|
void ChaoticGoodServerListener::ActiveConnection::HandshakingState:: |
|
|
|
OnHandshakeDone(absl::StatusOr<HandshakerArgs*> result) { |
|
|
|
OnHandshakeDone(absl::StatusOr<HandshakerArgs*> result) { |
|
|
|
if (!result.ok()) { |
|
|
|
if (!result.ok()) { |
|
|
|
connection_->Done( |
|
|
|
LOG_EVERY_N_SEC(ERROR, 5) << "Handshake failed: ", result.status(); |
|
|
|
absl::StrCat("Handshake failed: ", result.status().ToString())); |
|
|
|
connection_->Done(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
CHECK_NE(*result, nullptr); |
|
|
|
CHECK_NE(*result, nullptr); |
|
|
|
if ((*result)->endpoint == nullptr) { |
|
|
|
if ((*result)->endpoint == nullptr) { |
|
|
|
connection_->Done("Server handshake done but has empty endpoint."); |
|
|
|
LOG_EVERY_N_SEC(ERROR, 5) |
|
|
|
|
|
|
|
<< "Server handshake done but has empty endpoint."; |
|
|
|
|
|
|
|
connection_->Done(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
CHECK(grpc_event_engine::experimental::grpc_is_event_engine_endpoint( |
|
|
|
CHECK(grpc_event_engine::experimental::grpc_is_event_engine_endpoint( |
|
|
@ -429,12 +427,10 @@ void ChaoticGoodServerListener::ActiveConnection::HandshakingState:: |
|
|
|
EventEngineWakeupScheduler(connection_->listener_->event_engine_), |
|
|
|
EventEngineWakeupScheduler(connection_->listener_->event_engine_), |
|
|
|
[self = Ref()](absl::Status status) { |
|
|
|
[self = Ref()](absl::Status status) { |
|
|
|
if (!status.ok()) { |
|
|
|
if (!status.ok()) { |
|
|
|
self->connection_->Done( |
|
|
|
GRPC_TRACE_LOG(chaotic_good, ERROR) |
|
|
|
absl::StrCat("Server setting frame handling failed: ", |
|
|
|
<< "Server setting frame handling failed: " << status; |
|
|
|
StatusToString(status))); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
self->connection_->Done(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
self->connection_->Done(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
connection_->arena_.get()); |
|
|
|
connection_->arena_.get()); |
|
|
|
MutexLock lock(&connection_->mu_); |
|
|
|
MutexLock lock(&connection_->mu_); |
|
|
|