Skip to content

Commit

Permalink
Fixed an issue when get_messages() timeout was 0 we no messages were …
Browse files Browse the repository at this point in the history
…returned.

-Related to Issue #69.

Signed-off-by: David Rebbe <drebbe@intrepidcs.com>
(cherry picked from commit bea054f)
  • Loading branch information
drebbe-intrepid committed Aug 5, 2020
1 parent c69fd1f commit c042cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ PyObject* meth_get_messages(PyObject* self, PyObject* args)
return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to allocate " SPY_MESSAGE_OBJECT_NAME);
}
Py_BEGIN_ALLOW_THREADS
for (double i=timeout; i > 0; --i) {
for (double i=timeout; i >= 0; --i) {
count = 20000;
errors = 0;
if (!icsneoGetMessages(handle, (icsSpyMessage*)msgs, &count, &errors) && !errors) {
Expand Down

0 comments on commit c042cef

Please sign in to comment.