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:
parent
7cdede916a
commit
8bf0b2e3d3
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user