From 653cbf74b5e1cb067c7d387b0040422087188919 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sat, 4 Jul 2020 22:20:14 +0200 Subject: [PATCH] safeguard not needed with a semaphore --- callback_dispatcher.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/callback_dispatcher.cc b/callback_dispatcher.cc index 3b82872..69ee486 100644 --- a/callback_dispatcher.cc +++ b/callback_dispatcher.cc @@ -29,9 +29,7 @@ namespace pEp { throw std::invalid_argument("messageToSend must be set"); targets.push_back({messageToSend, notifyHandshake, on_startup, shutdown}); - - if (!Adapter::on_sync_thread()) - semaphore.go(); + semaphore.go(); } void CallbackDispatcher::remove(::messageToSend_t messageToSend)