TrajectoryBuilderStub sends WritesDone (#774)

This is required to close the connection, otherwise the server
cannot shutdown.
master
gaschler 2017-12-19 15:49:56 +01:00 committed by Wally B. Feed
parent 02734c296d
commit 383b988548
1 changed files with 4 additions and 0 deletions

View File

@ -31,15 +31,19 @@ TrajectoryBuilderStub::TrajectoryBuilderStub(
TrajectoryBuilderStub::~TrajectoryBuilderStub() { TrajectoryBuilderStub::~TrajectoryBuilderStub() {
if (rangefinder_writer_.client_writer) { if (rangefinder_writer_.client_writer) {
CHECK(rangefinder_writer_.client_writer->WritesDone());
CHECK(rangefinder_writer_.client_writer->Finish().ok()); CHECK(rangefinder_writer_.client_writer->Finish().ok());
} }
if (imu_writer_.client_writer) { if (imu_writer_.client_writer) {
CHECK(imu_writer_.client_writer->WritesDone());
CHECK(imu_writer_.client_writer->Finish().ok()); CHECK(imu_writer_.client_writer->Finish().ok());
} }
if (odometry_writer_.client_writer) { if (odometry_writer_.client_writer) {
CHECK(odometry_writer_.client_writer->WritesDone());
CHECK(odometry_writer_.client_writer->Finish().ok()); CHECK(odometry_writer_.client_writer->Finish().ok());
} }
if (fixed_frame_writer_.client_writer) { if (fixed_frame_writer_.client_writer) {
CHECK(fixed_frame_writer_.client_writer->WritesDone());
CHECK(fixed_frame_writer_.client_writer->Finish().ok()); CHECK(fixed_frame_writer_.client_writer->Finish().ok());
} }
} }