aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/message.cc')
-rw-r--r--src/google/protobuf/message.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc
index a0d3feba..42ec0337 100644
--- a/src/google/protobuf/message.cc
+++ b/src/google/protobuf/message.cc
@@ -170,12 +170,12 @@ size_t Message::SpaceUsedLong() const {
bool Message::SerializeToFileDescriptor(int file_descriptor) const {
io::FileOutputStream output(file_descriptor);
- return SerializeToZeroCopyStream(&output);
+ return SerializeToZeroCopyStream(&output) && output.Flush();
}
bool Message::SerializePartialToFileDescriptor(int file_descriptor) const {
io::FileOutputStream output(file_descriptor);
- return SerializePartialToZeroCopyStream(&output);
+ return SerializePartialToZeroCopyStream(&output) && output.Flush();
}
bool Message::SerializeToOstream(std::ostream* output) const {