File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,19 @@ class AckGroupingTracker : public std::enable_shared_from_this<AckGroupingTracke
7171 * @param[in] msgId ID of the message to be ACKed.
7272 * @param[in] callback the callback that is triggered when the message is acknowledged
7373 */
74- virtual void addAcknowledge (const MessageId& msgId, ResultCallback callback) { callback (ResultOk); }
74+ virtual void addAcknowledge (const MessageId& msgId, ResultCallback callback) {
75+ if (callback)
76+ callback (ResultOk);
77+ }
7578
7679 /* *
7780 * Adding message ID list into ACK group for individual ACK.
7881 * @param[in] msgIds of the message to be ACKed.
7982 * @param[in] callback the callback that is triggered when the messages are acknowledged
8083 */
8184 virtual void addAcknowledgeList (const MessageIdList& msgIds, ResultCallback callback) {
82- callback (ResultOk);
85+ if (callback)
86+ callback (ResultOk);
8387 }
8488
8589 /* *
@@ -88,7 +92,8 @@ class AckGroupingTracker : public std::enable_shared_from_this<AckGroupingTracke
8892 * @param[in] callback the callback that is triggered when the message is acknowledged
8993 */
9094 virtual void addAcknowledgeCumulative (const MessageId& msgId, ResultCallback callback) {
91- callback (ResultOk);
95+ if (callback)
96+ callback (ResultOk);
9297 }
9398
9499 /* *
You can’t perform that action at this time.
0 commit comments