livoxProto1:bug workaround: for boost:asio:udp async ops on dlopen libs

Updated Boost dependency to version 1.73.0 to address segfault issues with boost::asio in dynamic libraries. Refactored heartbeat socket management to use raw UDP sockets instead of boost::asio, improving compatibility and error handling during socket operations.
This commit is contained in:
2025-09-07 07:27:14 -04:00
parent 9a500e39ab
commit 1ededb85b9
3 changed files with 58 additions and 18 deletions
+5 -1
View File
@@ -6,6 +6,10 @@
#include <memory>
#include <atomic>
#include <optional>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <boost/asio.hpp>
#include "protocol.h"
@@ -94,7 +98,7 @@ private:
// Heartbeat state
std::unique_ptr<boost::asio::deadline_timer> heartbeatTimer;
std::unique_ptr<boost::asio::ip::udp::socket> heartbeatSocket;
int heartbeatSocketFd; // Raw socket file descriptor
std::atomic<bool> heartbeatActive;
};