Sanity checking
This commit is contained in:
@@ -395,7 +395,7 @@ int updateConnection(Connection *conn, Sitefile *site) {
|
|||||||
received = recvStream(conn->stream, buff, sizeof(buff));
|
received = recvStream(conn->stream, buff, sizeof(buff));
|
||||||
createFormatLog("Received %ld bytes", received);
|
createFormatLog("Received %ld bytes", received);
|
||||||
if (received < 0)
|
if (received < 0)
|
||||||
return errno != EAGAIN;
|
return errno != EAGAIN && totalReceived <= 0;
|
||||||
if (received == 0)
|
if (received == 0)
|
||||||
return 1;
|
return 1;
|
||||||
totalReceived += received;
|
totalReceived += received;
|
||||||
|
|||||||
Reference in New Issue
Block a user