This is an automated email from the ASF dual-hosted git repository.
ifplusor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new af38c0c fix: seed random (#428)
af38c0c is described below
commit af38c0c8449244b3325af7be71632a836221f95d
Author: xiaojin <[email protected]>
AuthorDate: Fri Jul 8 13:02:58 2022 +0800
fix: seed random (#428)
---
src/MQClientManager.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/MQClientManager.cpp b/src/MQClientManager.cpp
index 011ade2..ad82111 100644
--- a/src/MQClientManager.cpp
+++ b/src/MQClientManager.cpp
@@ -16,10 +16,14 @@
*/
#include "MQClientManager.h"
#include "Logging.h"
+#include <cstdlib>
+#include <ctime>
namespace rocketmq {
//<!************************************************************************
-MQClientManager::MQClientManager() {}
+MQClientManager::MQClientManager() {
+ std::srand(std::time(0));
+}
MQClientManager::~MQClientManager() {
m_factoryTable.clear();