diff options
Diffstat (limited to 'src/handler.c')
-rw-r--r-- | src/handler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/handler.c b/src/handler.c index ab9fdc4..164a484 100644 --- a/src/handler.c +++ b/src/handler.c @@ -148,8 +148,10 @@ int tip_client_state_process_payload_bulk(struct tip_client *cli) { sendfile(tip_client_socket(cli), cli->fd, &cli->offset, BLOCK); - if (cli->offset >= cli->size) + if (cli->offset >= cli->size) { + cli->state = TIP_CLIENT_CLOSE_WAIT; return 1; + } return 0; } |