Download raw body.
gotwebd: lower log priority of disconnections
On Wed, May 17, 2023 at 04:08:55PM +0200, Omar Polo wrote:
> On 2023/05/17 10:47:29 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> > On Wed, May 17, 2023 at 10:37:24AM +0200, Omar Polo wrote:
> > > if (err) {
> > > - log_warnx("%s: got_object_blob_getline failed: %s",
> > > - __func__, err->msg);
> > > + if (err->code == GOT_ERR_CANCELLED)
> >
> > Should't the above line say != instead of == ?
>
> indeed!
Looks good to me now, ok.
> > > + log_warnx("%s: got_object_blob_getline failed: %s",
> > > + __func__, err->msg);
>
> diff /home/op/w/gotacl
> commit - 9cd447eb681a736f222bbe134ca37c1fb30cfa89
> path + /home/op/w/gotacl
> blob - 7ef1dc685a64c90fa69ff126536248ae78ed21dc
> file + gotwebd/fcgi.c
> --- gotwebd/fcgi.c
> +++ gotwebd/fcgi.c
> @@ -435,7 +435,8 @@ send_response(struct request *c, int type, const uint8
> nanosleep(&ts, NULL);
> continue;
> }
> - log_warn("%s: write failure", __func__);
> + log_debug("%s: write failure: %s", __func__,
> + strerror(errno));
> c->sock->client_status = CLIENT_DISCONNECT;
> return -1;
> }
> blob - 29ec61186a821e0c8822b71b3de449927f04af1c
> file + gotwebd/got_operations.c
> --- gotwebd/got_operations.c
> +++ gotwebd/got_operations.c
> @@ -782,7 +782,8 @@ got_output_repo_tree(struct request *c,
> free(commit_id);
> free(tree_id);
> if (error) {
> - log_warnx("%s: %s", __func__, error->msg);
> + if (error->code != GOT_ERR_CANCELLED)
> + log_warnx("%s: %s", __func__, error->msg);
> return -1;
> }
> return 0;
> @@ -901,8 +902,9 @@ got_output_blob_by_lines(struct template *tp, struct g
> free(line);
>
> if (err) {
> - log_warnx("%s: got_object_blob_getline failed: %s",
> - __func__, err->msg);
> + if (err->code != GOT_ERR_CANCELLED)
> + log_warnx("%s: got_object_blob_getline failed: %s",
> + __func__, err->msg);
> return -1;
> }
> return 0;
> blob - 8fe5040921e4af979d40b487a1e97faf222e21d6
> file + gotwebd/pages.tmpl
> --- gotwebd/pages.tmpl
> +++ gotwebd/pages.tmpl
> @@ -919,11 +919,11 @@ static inline int rss_author(struct template *, char *
> {{ "\n" }}
> {!
> err = got_output_file_blame(c, &blame_line);
> - if (err) {
> + if (err && err->code != GOT_ERR_CANCELLED)
> log_warnx("%s: got_output_file_blame: %s", __func__,
> err->msg);
> + if (err)
> return (-1);
> - }
> !}
> </div>
> </div>
>
gotwebd: lower log priority of disconnections