mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-21 19:27:38 +03:00
fix typo and explicit a test
This commit is contained in:
parent
247d60d8e6
commit
a3d9df87cb
2
common.c
2
common.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user