Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
e6153e1b
Commit
e6153e1b
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix couple of federation state bugs
parent
5d6bad1b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/federation/federation_client.py
+4
-2
4 additions, 2 deletions
synapse/federation/federation_client.py
synapse/handlers/federation.py
+1
-1
1 addition, 1 deletion
synapse/handlers/federation.py
with
5 additions
and
3 deletions
synapse/federation/federation_client.py
+
4
−
2
View file @
e6153e1b
...
@@ -26,7 +26,7 @@ from synapse.util import unwrapFirstError
...
@@ -26,7 +26,7 @@ from synapse.util import unwrapFirstError
from
synapse.util.caches.expiringcache
import
ExpiringCache
from
synapse.util.caches.expiringcache
import
ExpiringCache
from
synapse.util.logutils
import
log_function
from
synapse.util.logutils
import
log_function
from
synapse.util.logcontext
import
preserve_fn
,
preserve_context_over_deferred
from
synapse.util.logcontext
import
preserve_fn
,
preserve_context_over_deferred
from
synapse.events
import
FrozenEvent
from
synapse.events
import
FrozenEvent
,
builder
import
synapse.metrics
import
synapse.metrics
from
synapse.util.retryutils
import
get_retry_limiter
,
NotRetryingDestination
from
synapse.util.retryutils
import
get_retry_limiter
,
NotRetryingDestination
...
@@ -499,8 +499,10 @@ class FederationClient(FederationBase):
...
@@ -499,8 +499,10 @@ class FederationClient(FederationBase):
if
"
prev_state
"
not
in
pdu_dict
:
if
"
prev_state
"
not
in
pdu_dict
:
pdu_dict
[
"
prev_state
"
]
=
[]
pdu_dict
[
"
prev_state
"
]
=
[]
ev
=
builder
.
EventBuilder
(
pdu_dict
)
defer
.
returnValue
(
defer
.
returnValue
(
(
destination
,
self
.
event_from_pdu_json
(
pdu_dict
)
)
(
destination
,
ev
)
)
)
break
break
except
CodeMessageException
as
e
:
except
CodeMessageException
as
e
:
...
...
This diff is collapsed.
Click to expand it.
synapse/handlers/federation.py
+
1
−
1
View file @
e6153e1b
...
@@ -596,7 +596,7 @@ class FederationHandler(BaseHandler):
...
@@ -596,7 +596,7 @@ class FederationHandler(BaseHandler):
preserve_fn
(
self
.
state_handler
.
resolve_state_groups
)(
room_id
,
[
e
])
preserve_fn
(
self
.
state_handler
.
resolve_state_groups
)(
room_id
,
[
e
])
for
e
in
event_ids
for
e
in
event_ids
]))
]))
states
=
dict
(
zip
(
event_ids
,
[
s
[
1
]
for
s
in
states
]))
states
=
dict
(
zip
(
event_ids
,
[
s
.
state
for
s
in
states
]))
state_map
=
yield
self
.
store
.
get_events
(
state_map
=
yield
self
.
store
.
get_events
(
[
e_id
for
ids
in
states
.
values
()
for
e_id
in
ids
],
[
e_id
for
ids
in
states
.
values
()
for
e_id
in
ids
],
...
...
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