diff --git a/cc/containers/hello_world_enclave_app/app_service.cc b/cc/containers/hello_world_enclave_app/app_service.cc index cffadc69f2..472067820e 100644 --- a/cc/containers/hello_world_enclave_app/app_service.cc +++ b/cc/containers/hello_world_enclave_app/app_service.cc @@ -63,8 +63,14 @@ grpc::Status EnclaveApplicationImpl::LegacySession( grpc::Status EnclaveApplicationImpl::OakSession( grpc::ServerContext* context, grpc::ServerReaderWriter* stream) { + // Set up channel and do handshake. auto channel = session_server_.NewChannel( std::make_unique(stream)); + if (!channel.ok()) { + return FromAbsl(channel.status()); + } + + // Handshake done, process requests until closed. while (true) { absl::StatusOr request = (*channel)->Receive(); if (!request.ok()) {