pnoltes commented on a change in pull request #257:
URL: https://github.com/apache/celix/pull/257#discussion_r442463106



##########
File path: bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
##########
@@ -550,14 +554,19 @@ processMsgForSubscriberEntry(pubsub_tcp_topic_receiver_t 
*receiver, psa_tcp_subs
             }
 
             if (status == CELIX_SUCCESS) {
-                bool release = true;
-                svc->receive(svc->handle, msgSer->msgName, msgSer->msgId, 
deSerializedMsg, message->metadata.metadata,
-                             &release);
-                if (release) {
-                    msgSer->freeDeserializeMsg(msgSer->handle, 
deSerializedMsg);
+                hash_map_iterator_t iter = 
hashMapIterator_construct(entry->subscriberServices);
+                while (hashMapIterator_hasNext(&iter)) {
+                    bool release = true;
+                    pubsub_subscriber_t *svc = 
hashMapIterator_nextValue(&iter);
+                    svc->receive(svc->handle, msgSer->msgName, msgSer->msgId, 
deSerializedMsg, message->metadata.metadata,

Review comment:
       Fixes the release handling. Now if ownership is taken (release == false) 
a new message will be deserialized.




----------------------------------------------------------------
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]


Reply via email to