From bcd9f5cdae08234c2acf50ed019d16b708be90b8 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Mon, 13 May 2024 15:59:05 -0700 Subject: [PATCH] forgot to init the vector --- reflector/TCSocket.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reflector/TCSocket.cpp b/reflector/TCSocket.cpp index b4c3995..b29e02c 100644 --- a/reflector/TCSocket.cpp +++ b/reflector/TCSocket.cpp @@ -293,6 +293,13 @@ bool CTCClient::Initialize(const std::string &address, const std::string &module m_Modules.assign(modules); m_Port = port; + m_Pfd.resize(m_Modules.size()); + for (auto &pf : m_Pfd) + { + pf.fd = -1; + pf.events = POLLIN; + } + std::cout << "Connecting to the TCP server..." << std::endl; for (char c : modules)