修复问题

This commit is contained in:
2026-08-09 15:30:12 +08:00
parent 6fe0bed78e
commit 4b9dd5c199
15 changed files with 616 additions and 278 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ asio::awaitable<void> Data_Feed_UDP_Server::send_coro(std::string_view data) {
co_return;
}
asio::awaitable<void> Data_Feed_UDP_Server::_open() {
const auto value = specific.snapshot();
const auto value = specific.read([](const auto& value) { return value; });
svr.set_bind_address("0.0.0.0", value.port);
svr.create();
server_logger->c_debug({}, {}, to_string() + "开启!");
@@ -60,7 +60,7 @@ void Data_feed_Config::server(Global* g) {
});
}
void BIN_Msg_Buffer::push(std::string_view msg) {
auto output_packet_size = Global::instance()->mode_acs.data_feed_config.settings.member<&Data_feed_Config_Data::packet_byte_size>().snapshot();
auto output_packet_size = Global::instance()->mode_acs.data_feed_config.settings.member<&Data_feed_Config_Data::packet_byte_size>().read([](const auto& value) { return value; });
std::lock_guard<std::mutex> g(mtx);
auto& pool = Global::instance()->mode_acs.data_feed_config.pool_;
if (msg_list_cache.empty() || msg_list_cache.back()->size() > output_packet_size) {
@@ -85,7 +85,7 @@ BIN_Msg_Buffer::BIN_Msg_Buffer() {
msg_list.reserve(8 * 1024);
}
Psc::JSON BIN_Msg_Buffer::state_json() {
auto output_packet_size = Global::instance()->mode_acs.data_feed_config.settings.member<&Data_feed_Config_Data::packet_byte_size>().snapshot();
auto output_packet_size = Global::instance()->mode_acs.data_feed_config.settings.member<&Data_feed_Config_Data::packet_byte_size>().read([](const auto& value) { return value; });
size_t size, cache_size, pool_capacity, pool_free_count;
{
std::lock_guard<std::mutex> g(mtx);