summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/drain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging/drain.cpp')
-rw-r--r--cpp/examples/messaging/drain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp
index 8c3abdbb14..4901fb303f 100644
--- a/cpp/examples/messaging/drain.cpp
+++ b/cpp/examples/messaging/drain.cpp
@@ -102,7 +102,7 @@ int main(int argc, char** argv)
}
std::cout << "')" << std::endl;
session.acknowledge();
- if (count and ++i == count)
+ if (count && ++i == count)
break;
}
receiver.close();