You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2020/08/11 11:03:18 UTC

[celix] branch master updated: When a publisher has no subscribers, publishing messages is not an error. This commit sets result to succes in that case.

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/master by this push:
     new f082ee6  When a publisher has no subscribers, publishing messages is not an error. This commit sets result to succes in that case.
     new afedd8c  Merge pull request #273 from Troepje/bugfix/publish_without_client_not_an_error
f082ee6 is described below

commit f082ee6cb230a069111976558b153f8bd3807876
Author: Troepje <tr...@gmail.com>
AuthorDate: Fri Jul 31 19:53:40 2020 +0200

    When a publisher has no subscribers, publishing messages is not an error. This commit sets result to succes in that case.
---
 .../pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_sender.c   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_sender.c b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_sender.c
index b6cfc38..26412fb 100644
--- a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_sender.c
+++ b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_sender.c
@@ -350,6 +350,8 @@ static int psa_websocket_topicPublicationSend(void* handle, unsigned int msgType
         }
     } else if (entry == NULL){
         L_WARN("[PSA_WEBSOCKET_TS] Error sending message with msg type id %i for scope/topic %s/%s", msgTypeId, sender->scope == NULL ? "(null)" : sender->scope, sender->topic);
+    } else { // when (sender->sockConnection == NULL) we dont have a client, but we do have a valid entry
+    	status = CELIX_SUCCESS; // Not an error, just nothing to do
     }
 
     return status;