fix bogus error if clients closes connection unexpectly
Reports a bogus: unknown read state 5, critical internal error for 127.0.0.1:60610master
parent
353c5d3660
commit
e46be236c7
10
src/core.c
10
src/core.c
|
@ -169,6 +169,16 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
|
|||
ev_io_set(&cli->io, tip_client_socket(cli), EV_READ | EV_WRITE);
|
||||
ev_io_start(loop, &cli->io);
|
||||
break;
|
||||
case TIP_CLIENT_PROCESSING_REQUEST_2:
|
||||
case TIP_CLIENT_PROCESSING_REQUEST_3:
|
||||
if (ret == 0) {
|
||||
syslog(LOG_ERR, "client %s:%hu unexpectedly closes connection\n",
|
||||
inet_ntoa(cli->addr.sin_addr), ntohs(cli->addr.sin_port));
|
||||
goto shutdown;
|
||||
}
|
||||
syslog(LOG_ERR, "unexpected read from client %s:%hu while in write state\n",
|
||||
inet_ntoa(cli->addr.sin_addr), ntohs(cli->addr.sin_port));
|
||||
goto close;
|
||||
case TIP_CLIENT_CLOSE_WAIT:
|
||||
if (ret == 0) {
|
||||
syslog(LOG_INFO, "client %s:%hu finished to download successfully\n",
|
||||
|
|
Loading…
Reference in New Issue