From 972d1c2e1a4e61d707ff384bad28d7e9768a0389 Mon Sep 17 00:00:00 2001 From: stefanrueger Date: Sun, 11 May 2025 11:38:11 +0200 Subject: [PATCH] Fix ser_posix.c receive timeout handling --- src/ser_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ser_posix.c b/src/ser_posix.c index b71028f8..d91045ca 100644 --- a/src/ser_posix.c +++ b/src/ser_posix.c @@ -451,9 +451,9 @@ static int ser_recv(const union filedescriptor *fd, unsigned char *buf, size_t b timeout.tv_sec = serial_recv_timeout/1000L; timeout.tv_usec = (serial_recv_timeout%1000L)*1000; - to2 = timeout; while(len < buflen) { + to2 = timeout; reselect: FD_ZERO(&rfds); FD_SET(fd->ifd, &rfds);