check sendfile error
parent
7a04638c32
commit
21aa4a9315
|
@ -164,7 +164,8 @@ int tip_client_state_process_payload_reply(struct tip_client *cli)
|
||||||
|
|
||||||
int tip_client_state_process_payload_bulk(struct tip_client *cli)
|
int tip_client_state_process_payload_bulk(struct tip_client *cli)
|
||||||
{
|
{
|
||||||
sendfile(tip_client_socket(cli), cli->fd, &cli->offset, BLOCK);
|
if (sendfile(tip_client_socket(cli), cli->fd, &cli->offset, BLOCK) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (cli->offset >= cli->size) {
|
if (cli->offset >= cli->size) {
|
||||||
cli->state = TIP_CLIENT_CLOSE_WAIT;
|
cli->state = TIP_CLIENT_CLOSE_WAIT;
|
||||||
|
|
Loading…
Reference in New Issue