1
0
mirror of https://github.com/wg/wrk synced 2025-01-08 23:32:54 +08:00

handle unexpected EOF as error

This commit is contained in:
Will 2015-11-04 21:40:57 +09:00
parent 7cdede916a
commit 8bf0b2e3d3

View File

@ -432,6 +432,8 @@ static void socket_readable(aeEventLoop *loop, int fd, void *data, int mask) {
}
if (http_parser_execute(&c->parser, &parser_settings, c->buf, n) != n) goto error;
if (n == 0 && !http_body_is_final(&c->parser)) goto error;
c->thread->bytes += n;
} while (n == RECVBUF && sock.readable(c) > 0);