Skip to content

Commit

Permalink
Add lock for redis client norifications (sonic-net#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored Sep 5, 2017
1 parent 3f4afbb commit 5573138
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions syncd/syncd_notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ void redisPutFdbEntryToAsicView(
const std::string &strField = fvField(e);
const std::string &strValue = fvValue(e);

std::lock_guard<std::mutex> lock(g_db_mutex);

g_redisClient->hset(key, strField, strValue);
}

Expand Down

0 comments on commit 5573138

Please sign in to comment.