Minor bugfixes

This commit is contained in:
Nate Choe
2022-01-30 18:02:25 -06:00
parent 1888bb9518
commit ffd41ceab7
2 changed files with 4 additions and 2 deletions

View File

@@ -205,6 +205,8 @@ static int processChar(Connection *conn, char c, Sitefile *site) {
size_t readLen = read(conn->fd, buffer, sizeof(buffer));
if (readLen == 0)
break;
if (readLen < 0)
return 1;
size_t writeLen = sendStream(conn->stream,
buffer, readLen);
if (writeLen < readLen)