From: Michal Bloch Date: Thu, 27 Jan 2022 17:32:22 +0000 (+0100) Subject: libdbus-p2p: fix messages sometimes not being sent X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ff2ca837a074d3b4a82337b4a2107514cbcc390;p=platform%2Fcore%2Fsystem%2Fdbus-tools.git libdbus-p2p: fix messages sometimes not being sent Change-Id: I989a600a7f664215545e4e3187448f431c4d10a2 Signed-off-by: Michal Bloch --- diff --git a/benchmark/libdbus-p2p-client.cpp b/benchmark/libdbus-p2p-client.cpp index 9788265..319b4e5 100644 --- a/benchmark/libdbus-p2p-client.cpp +++ b/benchmark/libdbus-p2p-client.cpp @@ -151,6 +151,12 @@ int main (int argc, char ** argv) dbus_connection_send (conn, msg, nullptr); dbus_message_unref (msg); + /* `send` is only required to add a message to the queue. + * It will usually flush the queue once messages start + * piling up, but we don't want any to linger around until + * then since that counts against their latency. */ + dbus_connection_flush (conn); + std::this_thread::sleep_for (opt.delay); }