diff --git a/src/libipc/circ/elem_def.h b/src/libipc/circ/elem_def.h index 4003948..24e4940 100755 --- a/src/libipc/circ/elem_def.h +++ b/src/libipc/circ/elem_def.h @@ -60,7 +60,7 @@ public: for (unsigned k = 0;; ipc::yield(k)) { cc_t curr = this->cc_.load(std::memory_order_acquire); cc_t next = curr | (curr + 1); // find the first 0, and set it to 1. - if (next == 0) { + if (next == curr) { // connection-slot is full. return 0; }