Driver: Add general predicate parameter for waitForRx

This commit is contained in:
Yasser Yassine
2024-05-28 18:21:22 +00:00
parent 659fcf633c
commit 77928dc93d
10 changed files with 22 additions and 14 deletions
+1 -1
View File
@@ -533,7 +533,7 @@ void TCP::readTask() {
uint8_t readbuf[READ_BUFFER_SIZE];
while(!closing) {
if(const auto received = ::recv(*socket, (char*)readbuf, READ_BUFFER_SIZE, 0); received > 0) {
writeToReadBuffer(readbuf, received);
pushRx(readbuf, received);
} else {
timeout.tv_sec = 0;
timeout.tv_usec = 50'000;