Sanity checking

This commit is contained in:
2022-07-03 21:38:03 -05:00
parent 09ae86a89b
commit 111046e5d4

View File

@@ -395,7 +395,7 @@ int updateConnection(Connection *conn, Sitefile *site) {
received = recvStream(conn->stream, buff, sizeof(buff));
createFormatLog("Received %ld bytes", received);
if (received < 0)
return errno != EAGAIN;
return errno != EAGAIN && totalReceived <= 0;
if (received == 0)
return 1;
totalReceived += received;