- Bugs:
Use the leaky bucket algorithm to rate limit irc messages.
Review Request #524 — Created Feb. 24, 2021 and submitted
The default values were suggested by an operator of libera.
We don't rate limit the login process, nor parts and quits. However, if you
paste a bunch of text and then part a channel, you will be spammed with a
bunch of "no such nick/channel" error dialogs. I tried to work around this,
but the alternative just makes irc unresponsive until all the pasted messages
are sent. That said, other messages are still delayed while these errors
dialogs are slowly popping up.
Lots
Description | From | Last Updated |
---|---|---|
we might need a flag to check if a partial send is in progress before pre-empting that send. |
grim | |
elb is concerned this may lead to an infinite loop an on error. |
grim | |
requeues need to be resized and available messages should NOT be decremented. |
grim | |
we need to make sure this function get called in all close paths. |
grim | |
Can you use gint64 and g_get_monotonic_time? |
QuLogic | |
I mean, the rest of the comment means it's not really dangerous, no? |
QuLogic | |
If the buffer is full and very very slow, this will cause an (almost) infinite loop. I don't know if … |
QuLogic | |
so? |
QuLogic | |
ourselves one? |
QuLogic | |
Every caller to this function has to do strlen, and in the partial send case, it's even ignored. So it … |
QuLogic | |
No message |
QuLogic | |
Should set irc->send_handler = 0 before removing. |
QuLogic | |
"to move past the characters" |
QuLogic | |
s/on/one/? |
QuLogic | |
So this means that messages cannot be sent with a granularity of less than 1 second now? |
QuLogic |
- Change Summary:
-
fix some issues that were identified with partial sends.
- Commit:
-
89988bab736d89c32aae8e75
- Description:
-
~ The default values were suggested by an operator of freenode.
~ The default values were suggested by an operator of libera.
We don't rate limit the login process, nor parts and quits. However, if you
paste a bunch of text and then part a channel, you will be spammed with a bunch of "no such nick/channel" error dialogs. I tried to work around this, but the alternative just makes irc unresponsive until all the pasted messages are sent. That said, other messages are still delayed while these errors dialogs are slowly popping up.
- Change Summary:
-
if we're currently in a partial send, queue prioity commands as the next command.
- Commit:
-
64cb1df9b8e9a0a9701fa441