summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:02:20 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:02:20 +0000
commit1310c649814f9a9e4618c3b7ac87cc05c1f7b543 (patch)
treec4b0e9074ed6ee39e1b6af8cfb8ee52f47c8db80
parentMerge pull request #6790 from matrix-org/rav/msc2260.1 (diff)
parentRemove unused DeviceRow class (#6800) (diff)
downloadsynapse-1310c649814f9a9e4618c3b7ac87cc05c1f7b543.tar.xz
Remove unused DeviceRow class (#6800)
* commit 'a855b7c3a':
  Remove unused DeviceRow class (#6800)
-rw-r--r--changelog.d/6800.bugfix1
-rw-r--r--synapse/federation/send_queue.py21
2 files changed, 2 insertions, 20 deletions
diff --git a/changelog.d/6800.bugfix b/changelog.d/6800.bugfix
new file mode 100644

index 0000000000..322a2758af --- /dev/null +++ b/changelog.d/6800.bugfix
@@ -0,0 +1 @@ +Fix race in federation sender worker that delayed sending of device updates. diff --git a/synapse/federation/send_queue.py b/synapse/federation/send_queue.py
index 0bb82a6bb3..001bb304ae 100644 --- a/synapse/federation/send_queue.py +++ b/synapse/federation/send_queue.py
@@ -454,28 +454,9 @@ class EduRow(BaseFederationRow, namedtuple("EduRow", ("edu",))): # Edu buff.edus.setdefault(self.edu.destination, []).append(self.edu) -class DeviceRow(BaseFederationRow, namedtuple("DeviceRow", ("destination",))): # str - """Streams the fact that either a) there is pending to device messages for - users on the remote, or b) a local users device has changed and needs to - be sent to the remote. - """ - - TypeId = "d" - - @staticmethod - def from_data(data): - return DeviceRow(destination=data["destination"]) - - def to_data(self): - return {"destination": self.destination} - - def add_to_buffer(self, buff): - buff.device_destinations.add(self.destination) - - TypeToRow = { Row.TypeId: Row - for Row in (PresenceRow, PresenceDestinationsRow, KeyedEduRow, EduRow, DeviceRow) + for Row in (PresenceRow, PresenceDestinationsRow, KeyedEduRow, EduRow,) }