this time maybe?

This commit is contained in:
Charles Descamps 2025-02-19 20:01:39 -07:00
parent d0e4356cdb
commit 09c1fb141b

View file

@ -123,7 +123,7 @@ int main(int argc, char **argv)
// grab the data from the client, save to message. // grab the data from the client, save to message.
messageBytes = recv(fileIter, message, BUFFER_SIZE, 0); messageBytes = recv(fileIter, message, BUFFER_SIZE, 0);
// make sure that the connection is still open before attempting to send. // 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); printf("\nmessageBytes: %d\n", messageBytes);
// if it is not open, close the socket and remove the socket from the socket list using FD_CLR() // if it is not open, close the socket and remove the socket from the socket list using FD_CLR()