diff --git a/CMakeLists.txt b/CMakeLists.txt index 6021a95..52ab993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,12 @@ project(Older) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(Libraries_ROOT /opt/Libraries) + +set(MBEDTLS_ROOT ${Libraries_ROOT}/mbedtls-3.6.2) +set(MBEDTLS_INCLUDE_DIR ${MBEDTLS_ROOT}/include) +set(MBEDTLS_LIBRARY_DIRS ${MBEDTLS_ROOT}/lib) + set(OPENSSL_LIBRARIES ssl crypto) include(FetchContent) diff --git a/Server/UdpServer.cpp b/Server/UdpServer.cpp index 2028b17..c86668a 100644 --- a/Server/UdpServer.cpp +++ b/Server/UdpServer.cpp @@ -53,7 +53,11 @@ void UdpServer::sendData() { using namespace std::chrono_literals; static uint32_t index = 0; m_timer.expires_after(1ms); - m_timer.async_wait([this](const boost::system::error_code &) { + m_timer.async_wait([this](const boost::system::error_code &error) { + if (error) { + LOG(error) << error.message(); + return; + } std::random_device rd; // 将用于获得随机数引擎的种子 std::mt19937 gen(rd()); // 以 rd() 播种的标准 mersenne_twister_engine std::uniform_int_distribution distribution(std::numeric_limits::min(), diff --git a/Server/conf/server.conf b/Server/conf/server.conf index 6e0f6e6..513790d 100644 --- a/Server/conf/server.conf +++ b/Server/conf/server.conf @@ -31,7 +31,7 @@ location ^~ /api/v1/login { content_by_lua_file lua/login.lua; } -location ~ /api/v1/.*$ { +location ~ ^/api/v1/.*$ { proxy_pass http://local; }