diff --git a/cartographer/cloud/client/map_builder_stub.cc b/cartographer/cloud/client/map_builder_stub.cc index 35cd1e5..f26922c 100644 --- a/cartographer/cloud/client/map_builder_stub.cc +++ b/cartographer/cloud/client/map_builder_stub.cc @@ -100,7 +100,6 @@ void MapBuilderStub::SerializeState(io::ProtoStreamWriterInterface* writer) { CHECK(client.Write(request)); proto::WriteStateResponse response; while (client.Read(&response)) { - // writer->WriteProto(response); switch (response.state_chunk_case()) { case proto::WriteStateResponse::kPoseGraph: writer->WriteProto(response.pose_graph()); @@ -115,7 +114,6 @@ void MapBuilderStub::SerializeState(io::ProtoStreamWriterInterface* writer) { LOG(FATAL) << "Unhandled message type"; } } - CHECK(writer->Close()); } void MapBuilderStub::LoadState(io::ProtoStreamReaderInterface* reader, diff --git a/cartographer/cloud/internal/handlers/write_state_handler.cc b/cartographer/cloud/internal/handlers/write_state_handler.cc index 0f7cb1f..88a2adc 100644 --- a/cartographer/cloud/internal/handlers/write_state_handler.cc +++ b/cartographer/cloud/internal/handlers/write_state_handler.cc @@ -52,6 +52,7 @@ void WriteStateHandler::OnRequest(const google::protobuf::Empty& request) { }); GetContext()->map_builder().SerializeState( &proto_stream_writer); + proto_stream_writer.Close(); } } // namespace handlers