Fixed crash trigger on Ctrl+C (errno == EINTR check)

This commit is contained in:
2025-11-13 15:43:46 +01:00
parent c85f622a60
commit b37a999274
7 changed files with 28 additions and 28 deletions

View File

@@ -40,7 +40,8 @@ namespace ColumnLynx::Net::TCP {
mInsecureMode(insecureMode),
mHeartbeatTimer(mSocket.get_executor()),
mLastHeartbeatReceived(std::chrono::steady_clock::now()),
mLastHeartbeatSent(std::chrono::steady_clock::now())
mLastHeartbeatSent(std::chrono::steady_clock::now()),
mTun(tun)
{}
void start();

View File

@@ -20,7 +20,10 @@ namespace ColumnLynx::Net::UDP {
std::array<uint8_t, 32>* aesKeyRef,
uint64_t* sessionIDRef,
std::shared_ptr<VirtualInterface> tunRef = nullptr)
: mSocket(ioContext), mResolver(ioContext), mHost(host), mPort(port), mAesKeyRef(aesKeyRef), mSessionIDRef(sessionIDRef), mTunRef(tunRef) { mStartReceive(); }
: mSocket(ioContext), mResolver(ioContext), mHost(host), mPort(port), mAesKeyRef(aesKeyRef), mSessionIDRef(sessionIDRef), mTunRef(tunRef)
{
mStartReceive();
}
void start();
void sendMessage(const std::string& data = "");