Download raw body.
gotd: handle early client disconnections
On 23-01-23 08:55AM, Stefan Sperling wrote: > On Mon, Jan 23, 2023 at 04:09:29PM +1100, Mark Jamsek wrote: > > On 23-01-22 02:50PM, Omar Polo wrote: > > > On 2023/01/23 00:08:40 +1100, Mark Jamsek <mark@jamsek.com> wrote: > > > > On 23-01-22 12:48PM, Omar Polo wrote: > > > > > if (strcmp(command, GOT_SERVE_CMD_FETCH) == 0) > > > > > err = serve_read(infd, outfd, gotd_sock, repo_path, chattygot); > > > > > else if (strcmp(command, GOT_SERVE_CMD_SEND) == 0) > > > > > - err = serve_write(infd, outfd, gotd_sock, repo_path, chattygot); > > > > > + err = serve_write(infd, outfd, gotd_sock, repo_path, > > > > > + chattygot); > > > > > > > > I can't see why the line has been wrapped; chattygot fits on the above > > > > line? > > > > > > the above line is 79 columns, that was 80 :) > > > > Oh whoops, I've been doing it wrong! I always thought it was [1,80] not > > [1,80) :) > > style(9) says "All code should fit in 80 columns." > I don't know if that includes code in diffs which has an extra column > at the beginning. I usually try to wrap at less than 80 but there are > cases where I just let run up to 80. In any case, not a big deal. I'm really not sure about the diff part either, but I always interpreted that line in style(9) to be 80 columns inclusive because it's 1-based; that is, if the last character is on column 80 that's ok. But it sounds like it's exclusive. Like you say, not a big deal, but I never even considered it was [1,80) till I read op's reply so it's good to now know! -- Mark Jamsek <fnc.bsdbox.org> GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68
gotd: handle early client disconnections