mirror of
https://github.com/wg/wrk
synced 2025-01-08 23:32:54 +08:00
pass EOF through to parser
This commit is contained in:
parent
6c15549e77
commit
522ec607f8
@ -17,7 +17,7 @@ status sock_close(connection *c) {
|
|||||||
status sock_read(connection *c, size_t *n) {
|
status sock_read(connection *c, size_t *n) {
|
||||||
ssize_t r = read(c->fd, c->buf, sizeof(c->buf));
|
ssize_t r = read(c->fd, c->buf, sizeof(c->buf));
|
||||||
*n = (size_t) r;
|
*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) {
|
status sock_write(connection *c, char *buf, size_t len, size_t *n) {
|
||||||
|
@ -458,7 +458,6 @@ static void socket_connected(aeEventLoop *loop, int fd, void *data, int mask) {
|
|||||||
error:
|
error:
|
||||||
c->thread->errors.connect++;
|
c->thread->errors.connect++;
|
||||||
reconnect_socket(c->thread, c);
|
reconnect_socket(c->thread, c);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void socket_writeable(aeEventLoop *loop, int fd, void *data, int mask) {
|
static void socket_writeable(aeEventLoop *loop, int fd, void *data, int mask) {
|
||||||
|
Loading…
Reference in New Issue
Block a user