added thread.sleep to prevenet console flood

This commit is contained in:
2025-01-15 14:40:24 +01:00
parent 50bf777f78
commit 7c30d838f7

View File

@@ -395,6 +395,8 @@ void CapnSend()
if (frame.empty()) if (frame.empty())
{ {
cerr << "Error: Could not capture image" << endl; cerr << "Error: Could not capture image" << endl;
std::this_thread::sleep_for(std::chrono::seconds(1)); // Wait before retrying
continue; continue;
} }