diff --git a/rd-cpp/thirdparty/clsocket/src/SimpleSocketSender.h b/rd-cpp/thirdparty/clsocket/src/SimpleSocketSender.h index 43c83fe86..f7048b132 100644 --- a/rd-cpp/thirdparty/clsocket/src/SimpleSocketSender.h +++ b/rd-cpp/thirdparty/clsocket/src/SimpleSocketSender.h @@ -13,10 +13,9 @@ class CSimpleSocketSender public: explicit CSimpleSocketSender(const std::shared_ptr& socket) : m_error(CSimpleSocket::SocketSuccess) { - if (socket->m_nSocketType == CSimpleSocket::CSocketType::SocketTypeTcp) - m_socket = socket; - else - m_socket = std::make_shared(); + if (socket->m_nSocketType != CSimpleSocket::CSocketType::SocketTypeTcp) + throw std::runtime_error("Only TCP sockets are supported"); + m_socket = socket; } int32_t Send(const uint8_t* pBuf, size_t bytesToSend) const; diff --git a/rd-cpp/thirdparty/clsocket/src/StatTimer.h b/rd-cpp/thirdparty/clsocket/src/StatTimer.h index 6f0f68d8a..78255ed86 100644 --- a/rd-cpp/thirdparty/clsocket/src/StatTimer.h +++ b/rd-cpp/thirdparty/clsocket/src/StatTimer.h @@ -62,8 +62,6 @@ #include "Host.h" -#include - #if defined(_WIN32) #define GET_CLOCK_COUNT(x) QueryPerformanceCounter((LARGE_INTEGER *)x) #else