diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-11-20 12:19:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 12:19:19 +0100 |
commit | 416c671474d719d793e6d35c7b7247c566ba9ec8 (patch) | |
tree | 622fd94127b169cc3c2a5038e88bdc9cd0d385da /synapse | |
parent | Merge remote-tracking branch 'origin/master' into develop (diff) | |
parent | changelog (diff) | |
download | synapse-416c671474d719d793e6d35c7b7247c566ba9ec8.tar.xz |
Merge pull request #4204 from matrix-org/rav/logcontext_leak_fixes
Fix some logcontext leaks
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/push/mailer.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index ebcb93bfc7..1eb5be0957 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -36,6 +36,7 @@ from synapse.push.presentable_names import ( ) from synapse.types import UserID from synapse.util.async_helpers import concurrently_execute +from synapse.util.logcontext import make_deferred_yieldable from synapse.visibility import filter_events_for_client logger = logging.getLogger(__name__) @@ -192,7 +193,7 @@ class Mailer(object): logger.info("Sending email push notification to %s" % email_address) - yield self.sendmail( + yield make_deferred_yieldable(self.sendmail( self.hs.config.email_smtp_host, raw_from, raw_to, multipart_msg.as_string().encode('utf8'), reactor=self.hs.get_reactor(), @@ -201,7 +202,7 @@ class Mailer(object): username=self.hs.config.email_smtp_user, password=self.hs.config.email_smtp_pass, requireTransportSecurity=self.hs.config.require_transport_security - ) + )) @defer.inlineCallbacks def get_room_vars(self, room_id, user_id, notifs, notif_events, room_state_ids): |