From 9fcf1ddb0d93283e148ec924af069160761584ef Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Sun, 1 Jan 2023 18:55:43 +0100 Subject: [PATCH] less than --- src/tibridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tibridge.c b/src/tibridge.c index 7dd3ed7..e465171 100644 --- a/src/tibridge.c +++ b/src/tibridge.c @@ -106,10 +106,11 @@ void retry_write_host(uint8_t* recv, int recvCount) { void retry_read_host(void* buf, unsigned int count) { if(connectionFd == -1) { connectionFd = accept(listenFd, NULL, NULL); + log(LEVEL_DEBUG, "Accepted connection\n"); } int c = 0; - while(c <= count) { + while(c < count) { int s = read(connectionFd, buf, count - c); if(s <= 0) { close(connectionFd);