Check if the clientSocket is a non-blocking socket

This commit is contained in:
2024-02-13 17:03:56 +01:00
parent e31d8b5949
commit 7d9d9a6efb

View File

@@ -265,6 +265,7 @@ void ArucoDetector::setNonBlocking(int sockfd) {
}
void ArucoDetector::sendData(int serverSocket, const std::string& data) {
std::cout << "Sending Data" << std::endl;
int clientSocket = accept(serverSocket, nullptr, nullptr);
if(clientSocket == -1 && errno != EWOULDBLOCK && errno != EAGAIN) {
perror("accept");