From f975da90ccbb70b4dda4142be629e0b54841a71f Mon Sep 17 00:00:00 2001 From: Francis Giraldeau Date: Thu, 26 Jul 2018 19:10:14 -0400 Subject: Fix sendmessage (#46) * Fix send message example If a secondary instance sends a message immediately after connecting, the message follows the init message. This causes the slotConnectionEstablished to read and consume the tail of the message and interpret it as the checksum. The checksum fails and the connection becomes invalid. To avoid this race, we prefix the init message with its length. This way, we consume only the data relevant to the init message. This patch fixes the sending_arguments example. Signed-off-by: Francis Giraldeau * Fix include file case Signed-off-by: Francis Giraldeau --- examples/calculator/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/calculator/main.cpp') diff --git a/examples/calculator/main.cpp b/examples/calculator/main.cpp index 32d8811..d45438f 100644 --- a/examples/calculator/main.cpp +++ b/examples/calculator/main.cpp @@ -50,7 +50,7 @@ #include -#include +#include #include "calculator.h" -- cgit v1.2.1