summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/topic_receiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging/topic_receiver.cpp')
-rw-r--r--cpp/examples/messaging/topic_receiver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/examples/messaging/topic_receiver.cpp b/cpp/examples/messaging/topic_receiver.cpp
index 45ab9448db..321231f93d 100644
--- a/cpp/examples/messaging/topic_receiver.cpp
+++ b/cpp/examples/messaging/topic_receiver.cpp
@@ -42,8 +42,8 @@ int main(int argc, char** argv) {
Message message = receiver.fetch();
std::cout << "Message: " << message.getContent() << std::endl;
if (message.getContent() == "That's all, folks!") {
- std::cout << "Cancelling receiver" << std::endl;
- receiver.cancel();
+ std::cout << "Closing receiver" << std::endl;
+ receiver.close();
break;
}
}