cf-natali commented on a change in pull request #356: libprocess: check 
protobuf (de)serialisation success.
URL: https://github.com/apache/mesos/pull/356#discussion_r405139203
 
 

 ##########
 File path: 3rdparty/libprocess/include/process/protobuf.hpp
 ##########
 @@ -39,8 +39,11 @@ inline void post(const process::UPID& to,
                  const google::protobuf::Message& message)
 {
   std::string data;
-  message.SerializeToString(&data);
-  post(to, message.GetTypeName(), data.data(), data.size());
+  if (message.SerializeToString(&data)) {
+    post(to, message.GetTypeName(), data.data(), data.size());
+  } else {
+    LOG(WARNING) << "Error serialising: " << message.DebugString();
 
 Review comment:
   Done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to