summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index c6d8963..e36b3fa 100644
--- a/src/core.c
+++ b/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",