Browse Source

try_pop_front() returns true on success, not on timeout! Thanks, thomas!

sync
Roker 7 years ago
parent
commit
05e7a8fa90
  1. 4
      Adapter.cc

4
Adapter.cc

@ -55,9 +55,9 @@ namespace pEp {
SYNC_EVENT _retrieve_next_sync_event(void *management, unsigned threshold)
{
SYNC_EVENT syncEvent = nullptr;
const bool timeout = q.try_pop_front(syncEvent, std::chrono::seconds(threshold));
const bool success = q.try_pop_front(syncEvent, std::chrono::seconds(threshold));
if (timeout)
if (!success)
return new_sync_timeout_event();
return syncEvent;

Loading…
Cancel
Save