As this function is called even if the select timeout didn't expire,
we'll have to check the eof_barrier and the data_send barrier also
early in afs_send_chunk() and return if there's time left.
afs_next_chunk_time(&due);
if (tv_diff(&due, &now, NULL) > 0)
return;
+ if (chk_barrier("eof", &now, &eof_barrier, &due, 1) < 0)
+ return;
+ if (chk_barrier("data send", &now, &data_send_barrier,
+ &due, 1) < 0)
+ return;
buf = af->read_chunk(mmd->current_chunk, &ret);
mmd->new_afs_status_flags &= ~AFS_REPOS;
if (!buf) {