1
0
mirror of https://github.com/wg/wrk synced 2025-01-08 06:52:55 +08:00

pass EOF through to parser

This commit is contained in:
Will 2015-01-31 14:33:27 +09:00
parent 6c15549e77
commit 522ec607f8
2 changed files with 1 additions and 2 deletions

View File

@ -17,7 +17,7 @@ status sock_close(connection *c) {
status sock_read(connection *c, size_t *n) {
ssize_t r = read(c->fd, c->buf, sizeof(c->buf));
*n = (size_t) r;
return r > 0 ? OK : ERROR;
return r >= 0 ? OK : ERROR;
}
status sock_write(connection *c, char *buf, size_t len, size_t *n) {

View File

@ -458,7 +458,6 @@ static void socket_connected(aeEventLoop *loop, int fd, void *data, int mask) {
error:
c->thread->errors.connect++;
reconnect_socket(c->thread, c);
}
static void socket_writeable(aeEventLoop *loop, int fd, void *data, int mask) {