abroekhuis commented on a change in pull request #172: Refactor TcpAdmin and 
add interfacing for VectorIoSerialisation
URL: https://github.com/apache/celix/pull/172#discussion_r401410476
 
 

 ##########
 File path: bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c
 ##########
 @@ -562,33 +566,38 @@ static int psa_zmq_topicPublicationSend(void* handle, 
unsigned int msgTypeId, co
             bool sendOk;
 
             if (bound->parent->zeroCopyEnabled) {
+                int flags = 0;
                 zmq_msg_t msg1; // Header
                 zmq_msg_t msg2; // Payload
                 zmq_msg_t msg3; // Metadata
                 void *socket = zsock_resolve(sender->zmq.socket);
 
-                zmq_msg_init_data(&msg1, headerData, headerLength, 
psa_zmq_freeMsg, bound);
                 //send header
-                int rc = zmq_msg_send(&msg1, socket, ZMQ_SNDMORE);
+                zmq_msg_init_data(&msg1, headerData, headerLength, 
psa_zmq_freeMsg, bound);
+                if ((payloadLength > 0) || (metadataLength > 0)) {
+                  flags = ZMQ_SNDMORE;
 
 Review comment:
   Does it make sense to only send a header, without any payload?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to