Skip to content

Commit

Permalink
Don't keep a partial job.
Browse files Browse the repository at this point in the history
  • Loading branch information
kr committed Jan 2, 2009
1 parent 54a7231 commit 373b197
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ binlog_replay(int fd, job binlog_jobs, const char *path)
r = read(fd, j->body, js.body_size);
if (r == -1) return twarn("read()");
if (r < js.body_size) {
warnx("dropping imcomplete job %llu", j->id);
job_remove(j);
binlog_dref(j->binlog);
job_free(j);
return binlog_warn("job body is too short", fd, path);
}
}
Expand Down

0 comments on commit 373b197

Please sign in to comment.