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.
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.