Extra logging
This commit is contained in:
@@ -393,6 +393,7 @@ int updateConnection(Connection *conn, Sitefile *site) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
received = recvStream(conn->stream, buff, sizeof(buff));
|
received = recvStream(conn->stream, buff, sizeof(buff));
|
||||||
|
createFormatLog("Received %ld bytes", received);
|
||||||
if (received < 0)
|
if (received < 0)
|
||||||
return errno != EAGAIN;
|
return errno != EAGAIN;
|
||||||
if (received == 0)
|
if (received == 0)
|
||||||
|
|||||||
@@ -88,13 +88,8 @@ void runServer(int connfd, Sitefile *site, int *pending, int id,
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
poll(fds, connCount, -1);
|
poll(fds, connCount, -1);
|
||||||
{
|
|
||||||
char log[200];
|
createFormatLog("poll() finished with %d connections", connCount);
|
||||||
sprintf(log,
|
|
||||||
"poll() finished with %d connections",
|
|
||||||
connCount);
|
|
||||||
createLog(log);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < connCount; i++) {
|
for (i = 1; i < connCount; i++) {
|
||||||
if (fds[i].revents & POLLIN) {
|
if (fds[i].revents & POLLIN) {
|
||||||
|
|||||||
Reference in New Issue
Block a user