forked-synapse/synapse
Richard van der Hoff 4876af06dd
Abort federation requests if the client disconnects early (#7930)
For inbound federation requests, if a given remote server makes too many
requests at once, we start stacking them up rather than processing them
immediatedly.

However, that means that there is a fair chance that the requesting server will
disconnect before we start processing the request. In that case, if it was a
read-only request (ie, a GET request), there is absolutely no point in
building a response (and some requests are quite expensive to handle).

Even in the case of a POST request, one of two things will happen:

 * Most likely, the requesting server will retry the request and we'll get the
   information anyway.

 * Even if it doesn't, the requesting server has to assume that we didn't get
   the memo, and act accordingly.

In short, we're better off aborting the request at this point rather than
ploughing on with what might be a quite expensive request.
2020-07-23 16:52:33 +01:00
..
_scripts Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
api Ensure that calls to json.dumps are compatible with the standard library json. (#7836) 2020-07-15 13:40:54 -04:00
app Convert synapse.app to async/await. (#7868) 2020-07-17 07:08:56 -04:00
appservice Include room states on invite events sent to ASes (#6455) 2020-07-10 18:44:56 +01:00
config Fix a typo in the sample config. (#7890) 2020-07-20 13:42:52 -04:00
crypto Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
events Fix deprecation warning: import ABC from collections.abc (#7892) 2020-07-20 13:33:04 -04:00
federation Abort federation requests if the client disconnects early (#7930) 2020-07-23 16:52:33 +01:00
groups Add HomeServer.signing_key property (#7805) 2020-07-08 17:51:56 +01:00
handlers Follow-up to admin API to re-activate accounts (#7908) 2020-07-22 12:33:19 -04:00
http Convert the federation agent and related code to async/await. (#7874) 2020-07-23 07:05:57 -04:00
logging Clean up PreserveLoggingContext (#7877) 2020-07-22 00:40:27 +01:00
metrics Improve stacktraces from exceptions in background processes (#7808) 2020-07-09 13:01:33 +01:00
module_api Wrap register_device coroutine in an ensureDeferred (#7684) 2020-06-16 10:13:59 +01:00
push Add ability to run multiple pusher instances (#7855) 2020-07-16 14:06:28 +01:00
replication Remove an unused prometheus metric (#7878) 2020-07-22 00:40:55 +01:00
res/templates Element CSS and logo in email templates (#7919) 2020-07-21 11:58:01 +01:00
rest Skip serializing /sync response if client has disconnected (#7927) 2020-07-22 13:44:16 +01:00
server_notices Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
spam_checker_api Add type hints to the spam check module (#6915) 2020-02-14 12:49:40 -05:00
state Add another yield point to state res v2 (#7746) 2020-06-26 10:44:52 +01:00
static Clean-up the fallback login code. (#7657) 2020-06-10 09:50:39 -04:00
storage Follow-up to admin API to re-activate accounts (#7908) 2020-07-22 12:33:19 -04:00
streams Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00
util Fix deprecation warning: import ABC from collections.abc (#7892) 2020-07-20 13:33:04 -04:00
__init__.py 1.17.0 2020-07-13 10:20:36 +01:00
event_auth.py Fix recursion error when fetching auth chain over federation (#7817) 2020-07-10 18:15:35 +01:00
notifier.py Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00
python_dependencies.py Allow to use higher versions of prometheus_client (#7780) 2020-07-06 10:21:41 +01:00
secrets.py isort 5 compatibility (#7786) 2020-07-05 16:32:02 +01:00
server.py Allow moving typing off master (#7869) 2020-07-16 15:12:54 +01:00
server.pyi Allow moving typing off master (#7869) 2020-07-16 15:12:54 +01:00
types.py isort 5 compatibility (#7786) 2020-07-05 16:32:02 +01:00
visibility.py Fix some spelling mistakes / typos. (#7811) 2020-07-09 09:52:58 -04:00