Merge pull request #648 from mouse-reeve/ssl-errors

Catch ssl errors in broadcast
This commit is contained in:
Mouse Reeve 2021-02-24 12:19:21 -08:00 committed by GitHub
commit 59f486dc17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@ import operator
import logging
from uuid import uuid4
import requests
from requests.exceptions import HTTPError, SSLError
from Crypto.PublicKey import RSA
from Crypto.Signature import pkcs1_15
@ -440,7 +441,7 @@ def broadcast_task(sender_id, activity, recipients):
for recipient in recipients:
try:
sign_and_send(sender, activity, recipient)
except requests.exceptions.HTTPError as e:
except (HTTPError, SSLError) as e:
logger.exception(e)