olucurious / PyFCM

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

Ensure requests.Session is not shared between threads #302

Closed keeth closed 2 years ago

keeth commented 2 years ago

Per psf/requests/issues/2766 requests.Session is likely not threadsafe.

This change puts the session in a thread local so that each thread has a different copy.