Skip to content

Commit

Permalink
pass EOF through to parser
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Jan 31, 2015
1 parent 6c15549 commit 522ec60
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/wrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 522ec60

Please sign in to comment.