diff --git a/Adapter.cc b/Adapter.cc index a5c8bf7..881d993 100644 --- a/Adapter.cc +++ b/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;