From b63ce299ddacea2ad487dc635926ed52ff422c20 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 03 八月 2020 11:40:17 +0800
Subject: [PATCH] add timeout nowait

---
 src/queue/include/array_lock_free_queue.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/queue/include/array_lock_free_queue.h b/src/queue/include/array_lock_free_queue.h
index 24a4ec6..233bc6a 100644
--- a/src/queue/include/array_lock_free_queue.h
+++ b/src/queue/include/array_lock_free_queue.h
@@ -311,7 +311,7 @@
 {
     int currentCount = m_count;
     uint32_t currentReadIndex = m_readIndex;
-    if (i < 0 || i >= currentCount)
+    if (i >= currentCount)
     {
         std::cerr << "ArrayLockFreeQueue<ELEM_T, Allocator>::operator[] , Error in array limits: " << i << " is out of range\n";
         std::exit(EXIT_FAILURE);

--
Gitblit v1.8.0