Commit c2d4f76c authored by root's avatar root Committed by caidaojin

little change

parent 303a3714
......@@ -140,8 +140,8 @@ butil::Status VBucketMapReader::OnReadOnePart(const void* data, size_t length) {
std::string complete = _buf.substr(pos, new_pos);
butil::VBUCKET_CONFIG_HANDLE vb =
butil::vbucket_config_parse_string(complete.c_str());
_listener->UpdateVBucketMap(vb);
if (vb != nullptr) {
_listener->UpdateVBucketMap(vb);
butil::vbucket_config_destroy(vb);
}
pos = new_pos + kSeparator.size();
......@@ -206,8 +206,8 @@ CouchbaseServerListener::~CouchbaseServerListener() {
void CouchbaseServerListener::InitVBucketMap(const std::string& str) {
butil::VBUCKET_CONFIG_HANDLE vb =
butil::vbucket_config_parse_string(str.c_str());
UpdateVBucketMap(vb);
if (vb != nullptr) {
UpdateVBucketMap(vb);
butil::vbucket_config_destroy(vb);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment