From 09c1fb141b2265ef11f60e517efdc3232c1e275a Mon Sep 17 00:00:00 2001 From: cdez Date: Wed, 19 Feb 2025 20:01:39 -0700 Subject: [PATCH] this time maybe? --- echoserver/echoserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echoserver/echoserver.c b/echoserver/echoserver.c index d3e59f9..80e41e0 100644 --- a/echoserver/echoserver.c +++ b/echoserver/echoserver.c @@ -123,7 +123,7 @@ int main(int argc, char **argv) // grab the data from the client, save to message. messageBytes = recv(fileIter, message, BUFFER_SIZE, 0); // make sure that the connection is still open before attempting to send. - if(messageBytes <= 0) + if(messageBytes == 0) // old: messageBytes <= 0 { printf("\nmessageBytes: %d\n", messageBytes); // if it is not open, close the socket and remove the socket from the socket list using FD_CLR()