summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-10-30 16:50:48 +0000
committerGitHub <noreply@github.com>2020-10-30 16:50:48 +0000
commit7a0fd6f98df48932f0af52d9396f085ac96ff9a2 (patch)
tree65d2aa957f2717670a4c92c7c0dad455622146dc
parentMerge branch 'master' into develop (diff)
downloadsynapse-7a0fd6f98df48932f0af52d9396f085ac96ff9a2.tar.xz
Fix error handling around when completing an AS transaction (#8693)
-rw-r--r--changelog.d/8693.misc1
-rw-r--r--synapse/storage/databases/main/appservice.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/8693.misc b/changelog.d/8693.misc
new file mode 100644
index 0000000000..b588bdd3e2
--- /dev/null
+++ b/changelog.d/8693.misc
@@ -0,0 +1 @@
+Add more type hints to the application services code.
diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py
index 26eef6eb61..e550cbc866 100644
--- a/synapse/storage/databases/main/appservice.py
+++ b/synapse/storage/databases/main/appservice.py
@@ -261,7 +261,7 @@ class ApplicationServiceTransactionWorkerStore(
             # has probably missed some events), so whine loudly but still continue,
             # since it shouldn't fail completion of the transaction.
             last_txn_id = self._get_last_txn(txn, service.id)
-            if (txn_id + 1) != txn_id:
+            if (last_txn_id + 1) != txn_id:
                 logger.error(
                     "appservice: Completing a transaction which has an ID > 1 from "
                     "the last ID sent to this AS. We've either dropped events or "