Open smartCharle opened 2 years ago
pool_.reset(new acl::redis_client_pool(addr, maxConn)); if (!pool_->aliving()) { acl_msg_error("pool not aliving"); return false; } acl_msg_info("%s: created pool", __FUNCTION__); if(param_.connTimeout_ > 0 && param_.reqTimeout_ > 0) { acl_msg_info("%s: set timeout %d,%d", __FUNCTION__, param_.connTimeout_, param_.reqTimeout_); pool_->set_timeout(param_.connTimeout_, param_.reqTimeout_); } auto client = pool_->peek(); if(nullptr == client) { acl_msg_error("error peek client"); return false; } acl_msg_info("peeked client");
建立使用 redis_client_cluster 做为通信类试一下。