diff options
author | June McEnroe <june@causal.agency> | 2020-05-11 18:05:41 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-05-11 18:16:19 -0400 |
commit | 548c4a3a86a37cf74aac5ef91f84b9a762dc1023 (patch) | |
tree | 810cdf6ea4d26421f4b2a36f3a35bda745fec628 /state.c | |
parent | Pass -1 as backlog to listen(2) (diff) | |
download | pounce-548c4a3a86a37cf74aac5ef91f84b9a762dc1023.tar.gz pounce-548c4a3a86a37cf74aac5ef91f84b9a762dc1023.zip |
Add server send queueing with time interval
This addresses pounce getting killed with "Excess flood" when it sends NAMES commands for too many channels when a client connects. These commands, as well as automatic AWAY commands, are by default throttled to 5 per second. Tested on freenode with 36 channels and 200ms interval.
Diffstat (limited to '')
-rw-r--r-- | state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/state.c b/state.c index 5da5bcc..3a5a154 100644 --- a/state.c +++ b/state.c @@ -413,6 +413,6 @@ void stateSync(struct Client *client) { ); } if (stateNoNames) continue; - serverFormat("NAMES %s\r\n", chan->name); + serverEnqueue("NAMES %s\r\n", chan->name); } } |