LivoxProto1: Get rid of raw FD for pcloudData recv

This commit is contained in:
2025-10-24 01:44:19 -04:00
parent 71c2b855ec
commit a5cf996ed2
2 changed files with 1 additions and 12 deletions
+1 -11
View File
@@ -101,8 +101,7 @@ handshakeTimeoutMs(handshakeTimeoutMs), retryDelayMs(retryDelayMs),
smoIp(smoIp), detectedSmoListeningIp(""), smoSubnetNbits(smoSubnetNbits),
dataPort(dataPort), cmdPort(cmdPort), imuPort(imuPort),
heartbeatActive(false),
pcloudDataActive(false),
pcloudDataFd(-1)
pcloudDataActive(false)
{
}
@@ -119,10 +118,6 @@ Device::~Device()
heartbeatTimer.reset();
pcloudDataSocketDesc.reset();
if (pcloudDataFd >= 0) {
close(pcloudDataFd);
pcloudDataFd = -1;
}
}
/**
@@ -1809,7 +1804,6 @@ bool Device::setupPcloudDataSocket()
std::make_unique<boost::asio::posix::stream_descriptor>(
componentThread->getIoService(), socketGuard.getFd());
pcloudDataFd = socketGuard.getFd();
socketGuard.release();
return true;
}
@@ -1820,10 +1814,6 @@ void Device::cleanupPcloudDataSocket()
pcloudDataSocketDesc->cancel();
pcloudDataSocketDesc.reset();
}
if (pcloudDataFd >= 0) {
close(pcloudDataFd);
pcloudDataFd = -1;
}
pcloudDataActive.store(false);
}
-1
View File
@@ -160,7 +160,6 @@ public:
// Point cloud data state
std::unique_ptr<boost::asio::posix::stream_descriptor> pcloudDataSocketDesc;
std::atomic<bool> pcloudDataActive;
int pcloudDataFd; // Socket file descriptor for point cloud data reception
public:
// UDP datagram handling