From 65f496489c258a3ba75a934ffdcd7557772624b8 Mon Sep 17 00:00:00 2001
From: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Date: Mon, 18 Nov 2024 14:39:13 +0000
Subject: [PATCH] A little change

---
 src/Socket2.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Socket2.cpp b/src/Socket2.cpp
index bee4437..8f644fd 100644
--- a/src/Socket2.cpp
+++ b/src/Socket2.cpp
@@ -770,6 +770,7 @@ void Socket2::_read(size_t bytes_to_read)
 {
 	unsigned char buffer[10000];
 	size_t bytes_total = data.size();
+	ssize_t bytes_readed;
 
 	while (bytes_total < bytes_to_read) {
 		int s = select(READ);
@@ -780,7 +781,7 @@ void Socket2::_read(size_t bytes_to_read)
 		else { /* s > 0 */ }
 
 		size_t count = min((size_t)max(input_queue_length(), 0), sizeof(buffer));
-		ssize_t bytes_readed = proto == UDP?
+		bytes_readed = proto == UDP?
 			::recvfrom(fd, buffer, count, 0, (sockaddr*) &sa, &sa_len):
 			::read(fd, buffer, count);
 
-- 
GitLab