summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-08-14 20:56:23 +1000
committerAmber Brown <hawkowl@atleastfornow.net>2018-08-14 20:56:23 +1000
commit591bf87c6afcdb4e8978a275219dd10dba4efc25 (patch)
treea2620b679bcaa6ecf75388be0ed5e17fa350d2cd /synapse/storage
parentFixes test_reap_monthly_active_users so it passes under postgres (diff)
parentImplement a new test baseclass to cut down on boilerplate (#3684) (diff)
downloadsynapse-591bf87c6afcdb4e8978a275219dd10dba4efc25.tar.xz
Merge remote-tracking branch 'origin/develop' into neilj/fix_reap_users_in_postgres
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/client_ips.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/client_ips.py b/synapse/storage/client_ips.py
index 2489527f2c..8fc678fa67 100644
--- a/synapse/storage/client_ips.py
+++ b/synapse/storage/client_ips.py
@@ -96,6 +96,11 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
         self._batch_row_update[key] = (user_agent, device_id, now)
 
     def _update_client_ips_batch(self):
+
+        # If the DB pool has already terminated, don't try updating
+        if not self.hs.get_db_pool().running:
+            return
+
         def update():
             to_update = self._batch_row_update
             self._batch_row_update = {}