diff --git a/client/client_connection.cpp b/client/client_connection.cpp index bd9639f6..42d5123e 100644 --- a/client/client_connection.cpp +++ b/client/client_connection.cpp @@ -237,6 +237,8 @@ void ClientConnection::getNextMessage(const MessageHandler& ha } auto response = msg::factory::createMessage(base_message_, buffer_.data()); + if (!response) + LOG(WARNING, LOG_TAG) << "Failed to deserialize message of type: " << base_message_.type << "\n"; for (auto iter = pendingRequests_.begin(); iter != pendingRequests_.end(); ++iter) { auto request = *iter; diff --git a/client/controller.cpp b/client/controller.cpp index b72a5cc9..9048c3d2 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -123,6 +123,11 @@ void Controller::getNextMessage() reconnect(); return; } + + if (!response) + { + return getNextMessage(); + } if (response->type == message_type::kWireChunk) {