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
Container Registry
Model registry
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
Maunium
synapse
Commits
c12b5577
Unverified
Commit
c12b5577
authored
3 years ago
by
Patrick Cloke
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix a harmless exception when the staged events queue is empty. (#10592)
parent
d2ad397d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/10592.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/10592.bugfix
synapse/federation/federation_server.py
+10
-5
10 additions, 5 deletions
synapse/federation/federation_server.py
with
11 additions
and
5 deletions
changelog.d/10592.bugfix
0 → 100644
+
1
−
0
View file @
c12b5577
Fix a bug introduced in v1.37.1 where an error could occur in the asyncronous processing of PDUs when the queue was empty.
This diff is collapsed.
Click to expand it.
synapse/federation/federation_server.py
+
10
−
5
View file @
c12b5577
...
...
@@ -972,13 +972,18 @@ class FederationServer(FederationBase):
# the room, so instead of pulling the event out of the DB and parsing
# the event we just pull out the next event ID and check if that matches.
if
latest_event
is
not
None
and
latest_origin
is
not
None
:
(
next_origin
,
next_event_id
,
)
=
await
self
.
store
.
get_next_staged_event_id_for_room
(
room_id
)
if
next_origin
!=
latest_origin
or
next_event_id
!=
latest_event
.
event_id
:
result
=
await
self
.
store
.
get_next_staged_event_id_for_room
(
room_id
)
if
result
is
None
:
latest_origin
=
None
latest_event
=
None
else
:
next_origin
,
next_event_id
=
result
if
(
next_origin
!=
latest_origin
or
next_event_id
!=
latest_event
.
event_id
):
latest_origin
=
None
latest_event
=
None
if
latest_origin
is
None
or
latest_event
is
None
:
next
=
await
self
.
store
.
get_next_staged_event_for_room
(
...
...
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