mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-31 20:08:36 -04:00
Don't limit connections to perspective servers
This commit is contained in:
parent
93f7bb8dd5
commit
6408541075
2 changed files with 21 additions and 22 deletions
|
@ -302,7 +302,7 @@ class MatrixFederationHttpClient(object):
|
|||
defer.returnValue(json.loads(body))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def post_json(self, destination, path, data={}):
|
||||
def post_json(self, destination, path, data={}, long_requests=True):
|
||||
""" Sends the specifed json data using POST
|
||||
|
||||
Args:
|
||||
|
@ -311,6 +311,8 @@ class MatrixFederationHttpClient(object):
|
|||
path (str): The HTTP path.
|
||||
data (dict): A dict containing the data that will be used as
|
||||
the request body. This will be encoded as JSON.
|
||||
long_retries (bool): A boolean that indicates whether we should
|
||||
retry for a short or long time.
|
||||
|
||||
Returns:
|
||||
Deferred: Succeeds when we get a 2xx HTTP response. The result
|
||||
|
@ -330,6 +332,7 @@ class MatrixFederationHttpClient(object):
|
|||
path.encode("ascii"),
|
||||
body_callback=body_callback,
|
||||
headers_dict={"Content-Type": ["application/json"]},
|
||||
long_requests=True,
|
||||
)
|
||||
|
||||
if 200 <= response.code < 300:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue