From 28ba94fa257b0b904a3f905c326b5cc69d993cd0 Mon Sep 17 00:00:00 2001 From: Jonathan Schwartz Date: Wed, 6 Dec 2023 22:35:17 +0000 Subject: [PATCH] Remove RTTI dependency, increase default timeout for communication --- include/icsneo/communication/communication.h | 2 +- include/icsneo/communication/message/filter/messagefilter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/icsneo/communication/communication.h b/include/icsneo/communication/communication.h index 7d7fc6c..331435b 100644 --- a/include/icsneo/communication/communication.h +++ b/include/icsneo/communication/communication.h @@ -66,7 +66,7 @@ public: bool removeMessageCallback(int id); std::shared_ptr waitForMessageSync( const std::shared_ptr& f = {}, - std::chrono::milliseconds timeout = std::chrono::milliseconds(50)) { + std::chrono::milliseconds timeout = std::chrono::milliseconds(500)) { return waitForMessageSync([](){ return true; }, f, timeout); } // onceWaitingDo is a way to avoid race conditions. diff --git a/include/icsneo/communication/message/filter/messagefilter.h b/include/icsneo/communication/message/filter/messagefilter.h index 9aaea0f..94d5892 100644 --- a/include/icsneo/communication/message/filter/messagefilter.h +++ b/include/icsneo/communication/message/filter/messagefilter.h @@ -29,7 +29,7 @@ public: if(message->type == Message::Type::Frame || message->type == Message::Type::Main51 || message->type == Message::Type::RawMessage || message->type == Message::Type::ReadSettings) { - const auto frame = std::dynamic_pointer_cast(message); + const auto frame = std::static_pointer_cast(message); if(!matchNetworkType(frame->network.getType())) return false; if(!matchNetID(frame->network.getNetID()))