Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 5faf22a

Browse files
committed
Merge branch 'ajaus/allow-push-timeout-disable' into 'main'
[REMIX-3850] Correct issue where disabled timeouts were ignored by push methods. See merge request lightspeedrtx/bridge-remix-nv!143
2 parents 72385cb + 6ef10bd commit 5faf22a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/util_atomiccircularqueue.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ namespace bridge_util {
8787
// Push object to queue
8888
Result push(const T& obj) {
8989
ULONGLONG start = 0, curTick;
90+
const DWORD timeoutMS = GlobalOptions::getCommandTimeout();
9091
do {
9192
const auto currentRead = m_read->load(std::memory_order_relaxed);
9293
const auto nextRead = queueIdxInc(currentRead);
@@ -103,7 +104,7 @@ namespace bridge_util {
103104

104105
curTick = GetTickCount64();
105106
start = start > 0 ? start : curTick;
106-
} while (start + GlobalOptions::getCommandTimeout() > curTick);
107+
} while (timeoutMS == 0 || start + timeoutMS > curTick);
107108

108109
return Result::Failure;
109110
}

0 commit comments

Comments
 (0)