commit 81df72e1bd1474d79928c8478d09e8c713f1cdca from: Omar Polo date: Mon Mar 25 09:33:57 2024 UTC don't pause the request in gemini_parse_reply() a parse routine shouldn't interfere with the handling of the events; pulling this into the caller makes the logic simpler to follow. commit - 5f285272dff39a7d4b876e094dd60b9afab0f523 commit + 81df72e1bd1474d79928c8478d09e8c713f1cdca blob - 22d16cbae24715360fe2f536604709b747f652da blob + 9ad57d0ae035724da93b06089b3cc2689bc571c1 --- net.c +++ net.c @@ -376,10 +376,6 @@ gemini_parse_reply(struct req *req, const char *header die(); imsg_close(&iev_ui->ibuf, ibuf); imsg_event_add(iev_ui); - - /* pause until we've told go go ahead */ - ev_del(req->fd); - return code; } @@ -511,8 +507,13 @@ net_ev(int fd, int ev, void *d) close_with_err(req, "Malformed gemini reply"); return; } - if (r < 20 || r >= 30) + if (r < 20 || r >= 30) { close_conn(0, 0, req); + return; + } + + /* pause until we've told go go ahead */ + ev_del(req->fd); return; }