Skip to content

Commit

Permalink
handle unexpected EOF as error
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Nov 4, 2015
1 parent 7cdede9 commit 8bf0b2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8bf0b2e

Please sign in to comment.