From fab33f37c7d9a6272b93353d7f767ccb3d803af3 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Wed, 7 Feb 2024 18:48:34 -0700 Subject: [PATCH 1/2] Specify the aioapns event loop to use so proxying works when configured --- sygnal/apnspushkin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sygnal/apnspushkin.py b/sygnal/apnspushkin.py index f227dc5a..a334745c 100644 --- a/sygnal/apnspushkin.py +++ b/sygnal/apnspushkin.py @@ -213,6 +213,9 @@ async def make_apns() -> aioapns.APNs: # without this, aioapns will retry every second forever. self.apns_client.pool.max_connection_attempts = 3 + # without this, aioapns will not use the proxy if one is configured. + self.apns_client.pool.loop = loop + def _report_certificate_expiration(self, certfile: str) -> None: """Export the epoch time that the certificate expires as a metric.""" with open(certfile, "rb") as f: From 4af11207bc9da50bba83d1dbadc59c0747399894 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Thu, 8 Feb 2024 11:47:45 -0700 Subject: [PATCH 2/2] Add changelog entry --- changelog.d/360.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/360.bugfix diff --git a/changelog.d/360.bugfix b/changelog.d/360.bugfix new file mode 100644 index 00000000..5529e96e --- /dev/null +++ b/changelog.d/360.bugfix @@ -0,0 +1 @@ +Fixed an issue which resulted in proxy configuration being ignored for APNs notifications.