Skip to content

Commit

Permalink
Specify the aioapns event loop to use so proxying works when configured
Browse files Browse the repository at this point in the history
  • Loading branch information
devonh committed Feb 8, 2024
1 parent e2eaa5c commit fab33f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sygnal/apnspushkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fab33f3

Please sign in to comment.