mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
limit rate of webxdc updates (#3417)
* more flexible render_webxdc_status_update_object() * delay webxdc updates when ratelimit is reached * inject updates messages to the SMTP loop as needed this avoids starting several tasks and allows sending updates out after a restart of the app. * use mutex to prevent race conditions in status updates * check ratelimiter only before the sending loop; it won't change until messages are actually sent out * fix typo * prefer standard type declaration over turbofish syntax * use UNIQUE and ON CONFLICT for query smtp_status_updates * combine DELETE+SELECT to one atomic statement * as all operations on smtp_status_updates are now atomic, a mutex is no longer needed * test DELETE+RETURNING statement * simplify calls to can_send() * comment about ratelimit boolean in send_smtp_messages()
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- format message lines starting with `>` as quotes #3434
|
||||
- node: remove `split2` dependency #3418
|
||||
- node: add git installation info to readme #3418
|
||||
- limit the rate of webxdc update sending #3417
|
||||
|
||||
### Fixes
|
||||
- set a default error if NDN does not provide an error
|
||||
|
||||
Reference in New Issue
Block a user