MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
203 stars 81 forks source link

gcm retries to infinity and beyond (*11 days) #31

Open julianhille opened 5 years ago

julianhille commented 5 years ago

The gcm module uses the local request lib from utils/request.js This lib auto retries the connection and has no limitation on retries.

Example: If there is some snake oil in the network or on the host machine like an "endpoint protection" which injects ssl certs this will be retried with something like "Error: SSL Cert self signed certificate in certificate chain" but will NEVER raise any exception or give up retrying.

I guess this would finally fail after round about 10-11 days with Maximum call stack size exceeded (max stack size default in node 984, 15 seconds wait time ... you do the math).

MatthieuLemoine commented 5 years ago

You're right. This module could use a clever retry strategy.