From 87f130c55e2e60f16e9f281f5acbc1e08cd80452 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 8 Jul 2019 12:17:31 +0200 Subject: [PATCH] Fix an issue where the app might not reconnect to the core. --- libnymea-app-core/jsonrpc/jsonrpcclient.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnymea-app-core/jsonrpc/jsonrpcclient.cpp b/libnymea-app-core/jsonrpc/jsonrpcclient.cpp index 3c2f677c..7fddca5a 100644 --- a/libnymea-app-core/jsonrpc/jsonrpcclient.cpp +++ b/libnymea-app-core/jsonrpc/jsonrpcclient.cpp @@ -322,6 +322,8 @@ void JsonRpcClient::onInterfaceConnectedChanged(bool connected) } } else { qDebug() << "JsonRpcClient: Transport connected. Starting handshake."; + // Clear anything that might be left in the buffer from a previous connection. + m_receiveBuffer.clear(); QVariantMap params; params.insert("locale", QLocale().name()); sendCommand("JSONRPC.Hello", params, this, "helloReply");