Extra logging

This commit is contained in:
2022-07-02 13:45:39 -05:00
parent ddd62990b3
commit 09ae86a89b
2 changed files with 3 additions and 7 deletions

View File

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

View File

@@ -88,13 +88,8 @@ void runServer(int connfd, Sitefile *site, int *pending, int id,
for (;;) {
poll(fds, connCount, -1);
{
char log[200];
sprintf(log,
"poll() finished with %d connections",
connCount);
createLog(log);
}
createFormatLog("poll() finished with %d connections", connCount);
for (i = 1; i < connCount; i++) {
if (fds[i].revents & POLLIN) {