summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:56:35 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:56:35 +0200
commit4fd27d0f8f1fd7dd21e35558bd9941435267d35d (patch)
treebb6feeed989c219c84f58fdcb7a101ce9281bfe6
parentf975e644fb5c4e4dff4d9872b60e7467528e779f (diff)
Remove bogus assert in protocols
Checking data != null is not a good way to check if entry was added
-rw-r--r--src/protocols.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/protocols.cc b/src/protocols.cc
index a1eaa58..31b3bfd 100644
--- a/src/protocols.cc
+++ b/src/protocols.cc
@@ -72,11 +72,6 @@ public:
void update(size_t id, void const* data, size_t size) override {
std::unique_lock<std::mutex> lock(mutex_);
auto& entry = entries_[id];
- if (!entry.data_) {
- assert(false);
- entries_.erase(id);
- return;
- }
entry.data_ = data;
if (entry.size_ == size) return;
auto old = entry.size_;