Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
efa4ccfa
Commit
efa4ccfa
authored
8 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
E2E key query: handle federation fails
Don't fail the whole request if we can't connect to a particular server.
parent
0d81e267
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/e2e_keys.py
+11
-0
11 additions, 0 deletions
synapse/handlers/e2e_keys.py
with
11 additions
and
0 deletions
synapse/handlers/e2e_keys.py
+
11
−
0
View file @
efa4ccfa
...
...
@@ -16,6 +16,7 @@
import
ujson
as
json
import
logging
import
twisted.internet.error
from
canonicaljson
import
encode_canonical_json
from
twisted.internet
import
defer
...
...
@@ -111,6 +112,11 @@ class E2eKeysHandler(object):
failures
[
destination
]
=
{
"
status
"
:
503
,
"
message
"
:
"
Not ready for retry
"
,
}
except
Exception
as
e
:
# include ConnectionRefused and other errors
failures
[
destination
]
=
{
"
status
"
:
503
,
"
message
"
:
e
.
message
}
yield
preserve_context_over_deferred
(
defer
.
gatherResults
([
preserve_fn
(
do_remote_query
)(
destination
)
...
...
@@ -222,6 +228,11 @@ class E2eKeysHandler(object):
failures
[
destination
]
=
{
"
status
"
:
503
,
"
message
"
:
"
Not ready for retry
"
,
}
except
Exception
as
e
:
# include ConnectionRefused and other errors
failures
[
destination
]
=
{
"
status
"
:
503
,
"
message
"
:
e
.
message
}
yield
preserve_context_over_deferred
(
defer
.
gatherResults
([
preserve_fn
(
claim_client_keys
)(
destination
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment