olucurious / PyFCM

Python client for FCM - Firebase Cloud Messaging (Android, iOS and Web)
http://olucurious.github.io/PyFCM/
MIT License
805 stars 205 forks source link

Add retries to requests session #241

Closed helloagain-dev closed 5 years ago

helloagain-dev commented 5 years ago

This is a copy of https://github.com/olucurious/PyFCM/pull/224

Use the retry feature of urllib3. It seems, that the Retry-After header is not sent anymore. We only receive a 502 which is not properly handled by pyfcm.

The Retry class can be passed to the requests session which takes care of this. It would even handle the Retry-After header which would make some code obsolete.