From 383b988548cf87aa1774f73eb32f57ac54aab3e9 Mon Sep 17 00:00:00 2001 From: gaschler Date: Tue, 19 Dec 2017 15:49:56 +0100 Subject: [PATCH] TrajectoryBuilderStub sends WritesDone (#774) This is required to close the connection, otherwise the server cannot shutdown. --- cartographer_grpc/mapping/trajectory_builder_stub.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cartographer_grpc/mapping/trajectory_builder_stub.cc b/cartographer_grpc/mapping/trajectory_builder_stub.cc index 266b367..67f10a4 100644 --- a/cartographer_grpc/mapping/trajectory_builder_stub.cc +++ b/cartographer_grpc/mapping/trajectory_builder_stub.cc @@ -31,15 +31,19 @@ TrajectoryBuilderStub::TrajectoryBuilderStub( TrajectoryBuilderStub::~TrajectoryBuilderStub() { if (rangefinder_writer_.client_writer) { + CHECK(rangefinder_writer_.client_writer->WritesDone()); CHECK(rangefinder_writer_.client_writer->Finish().ok()); } if (imu_writer_.client_writer) { + CHECK(imu_writer_.client_writer->WritesDone()); CHECK(imu_writer_.client_writer->Finish().ok()); } if (odometry_writer_.client_writer) { + CHECK(odometry_writer_.client_writer->WritesDone()); CHECK(odometry_writer_.client_writer->Finish().ok()); } if (fixed_frame_writer_.client_writer) { + CHECK(fixed_frame_writer_.client_writer->WritesDone()); CHECK(fixed_frame_writer_.client_writer->Finish().ok()); } }