X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fs_bsd.c;h=e379e61fb2e800b254ba151e0771139b501abdf3;hb=cc05a230ac079fa15a2e43e6e68ef7126128cefd;hp=5e78031256a5159ab33db4ffd58997a5b793cb0d;hpb=b8294f6c0db86ec8d204b0fda51070f3a415fb57;p=ircu2.10.12-pk.git diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c index 5e78031..e379e61 100644 --- a/ircd/s_bsd.c +++ b/ircd/s_bsd.c @@ -773,7 +773,7 @@ static int read_packet(struct Client *cptr, int socket_ready) /* If there's still data to process, wait 2 seconds first */ if (DBufLength(&(cli_recvQ(cptr))) && !NoNewLine(cptr) && - !(cli_freeflag(cptr) & FREEFLAG_TIMER)) { + !t_onqueue(&(cli_proc(cptr)))) { Debug((DEBUG_LIST, "Adding client process timer for %C", cptr)); cli_freeflag(cptr) |= FREEFLAG_TIMER; timer_add(&(cli_proc(cptr)), client_timer_callback, cli_connect(cptr), @@ -1066,9 +1066,9 @@ static void client_timer_callback(struct Event* ev) assert(0 == cptr || con == cli_connect(cptr)); - con_freeflag(con) &= ~FREEFLAG_TIMER; /* timer has expired... */ - if (ev_type(ev)== ET_DESTROY) { + con_freeflag(con) &= ~FREEFLAG_TIMER; /* timer has expired... */ + if (!con_freeflag(con) && !cptr) free_connection(con); /* client is being destroyed */ } else {