Skip to content

Commit

Permalink
Fixed a bug where the storage service might crash (vesoft-inc#583)
Browse files Browse the repository at this point in the history
        Fixed possible thread competition for checking listener_ .
  • Loading branch information
monadbobo committed Jul 19, 2019
1 parent 361ac99 commit 73a8243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/meta/client/MetaClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class MetaClient {
void init();

void registerListener(MetaChangedListener* listener) {
CHECK(listener_ == nullptr);
folly::RWSpinLock::WriteHolder holder(listenerLock_);
CHECK(listener_ == nullptr);
listener_ = listener;
}

Expand Down

0 comments on commit 73a8243

Please sign in to comment.