commit 4f152e84c01e22799218a449a85a105ff94fdf9d from: Omar Polo date: Fri Feb 10 21:49:27 2023 UTC gotwebd: abort blame if the client disconnect midway thru Without setting err when the callback fails we continue the blame machinery. commit - faf054c3d5fbad3a55534ebe525d58156c7aad27 commit + 4f152e84c01e22799218a449a85a105ff94fdf9d blob - a2a6ba3a8938088f3b8c6306af7ae41ce8bf181d blob + 5213b41bf3ead6134a9406eeefc91ebc07fbb000 --- gotwebd/got_operations.c +++ gotwebd/got_operations.c @@ -981,8 +981,10 @@ got_gotweb_blame_cb(void *arg, int nlines, int lineno, } if (a->cb(c->tp, line, bline, a->nlines_prec, - a->lineno_cur) == -1) + a->lineno_cur) == -1) { + err = got_error(GOT_ERR_CANCELLED); break; + } a->lineno_cur++; bline = &a->lines[a->lineno_cur - 1];