fix typo and explicit a test

This commit is contained in:
yrutschle 2020-12-02 22:48:17 +01:00
parent 247d60d8e6
commit a3d9df87cb
2 changed files with 2 additions and 2 deletions

@ -466,7 +466,7 @@ int fd2fd(struct queue *target_q, struct queue *from_q)
case ECONNRESET:
case EPIPE:
/* remove end closed -- drop the connection */
/* remote end closed -- drop the connection */
return FD_CNXCLOSED;
}
} else if (size_w < size_r) {

@ -58,7 +58,7 @@ int shovel(struct connection *cnx)
for (i = 0; i < 2; i++) {
if (FD_ISSET(cnx->q[i].fd, &fds)) {
res = fd2fd(&cnx->q[1-i], &cnx->q[i]);
if (!res) {
if (res == FD_CNXCLOSED) {
if (cfg.verbose)
fprintf(stderr, "%s %s", i ? "client" : "server", "socket closed\n");
return res;