commit ad5cb26d7ea1326e3b195caa3b459ea287aded90 from: Omar Polo via: Thomas Adam date: Fri Feb 17 16:23:18 2023 UTC gotwebd: abort blame if the client disconnect midway thru Without setting err when the callback fails we continue the blame machinery. commit - 088f4d22ce3dcd3090bd440308e0b8b4fc8529aa commit + ad5cb26d7ea1326e3b195caa3b459ea287aded90 blob - be67c17be661b6c2d2bfba6a97ffdd68e5dea669 blob + 8b6ec707be2e7409257caf0c0014f894762f1bb5 --- 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];