Download raw body.
simplify gotd accept backoff timer
gotd_accept_paused() is redundant, remove it. The gotd_accept() handler already handles the EV_TIMEOUT case. We do not need a separate function for this case. ok? diff eb635f16ef20c2f8a5b7721adf77a68cbab8e57b 9e6638eef34414276d21288ef5bba95a9d8059a5 commit - eb635f16ef20c2f8a5b7721adf77a68cbab8e57b commit + 9e6638eef34414276d21288ef5bba95a9d8059a5 blob - ed7d64ae64a9f407da94123ef917c0c8d3bb05ed blob + 5e354ab042e0fdb202fbd1524b28dce4ed292333 --- gotd/listen.c +++ gotd/listen.c @@ -256,12 +256,6 @@ accept_reserve(int fd, struct sockaddr *addr, socklen_ } static void -gotd_accept_paused(int fd, short event, void *arg) -{ - event_add(&gotd_listen.iev.ev, NULL); -} - -static void gotd_accept(int fd, short event, void *arg) { struct gotd_imsgev *iev = arg; @@ -475,7 +469,7 @@ start_listening(void) gotd_accept, iev); if (event_add(&iev->ev, NULL)) fatalx("event add"); - evtimer_set(&gotd_listen.pause_ev, gotd_accept_paused, NULL); + evtimer_set(&gotd_listen.pause_ev, gotd_accept, NULL); log_debug("listening for client connections"); }
simplify gotd accept backoff timer