mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
dcc-server: expire idle accepted clients
DCC SERVER accepts and retains every peer connection, while the generic DCC timeout explicitly excludes server records. Silent peers can exhaust file descriptors and memory. Apply the existing DCC timeout to accepted DCC SERVER clients until they send their first protocol line.
This commit is contained in:
parent
68131a09be
commit
86c881a028
1 changed files with 5 additions and 2 deletions
|
|
@ -461,13 +461,16 @@ static int dcc_timeout_func(void)
|
|||
DCC_REC *dcc = tmp->data;
|
||||
|
||||
next = tmp->next;
|
||||
if (dcc->tagread == -1 && now > dcc->created && !IS_DCC_SERVER(dcc)) {
|
||||
if (now > dcc->created &&
|
||||
((dcc->tagread == -1 && !IS_DCC_SERVER(dcc)) ||
|
||||
(IS_DCC_SERVER(dcc) && dcc->tagread != -1))) {
|
||||
/* Timed out - don't send DCC REJECT CTCP so CTCP
|
||||
flooders won't affect us and it really doesn't
|
||||
matter that much anyway if the other side doen't
|
||||
get it..
|
||||
|
||||
We don't want dcc servers to time out. */
|
||||
Connected DCC SERVER clients must send their first
|
||||
protocol line before the timeout. */
|
||||
dcc_close(dcc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue