ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

keep this on Sender object in retries #55

Closed pbininda closed 10 years ago

pbininda commented 10 years ago

I use node-gcm behind a proxy. Setting the proxy option in the Sender constructor only works for the initial call to sendNoRetry. The retries pass the global object as this because they are called via the sendNoRetryMethod. I replaced these calls with self.sendNoRetry to pass the correct this.

2fours commented 10 years ago

This probably explains why all my retries fail. #51 was my attempt to fix it but this seems to do the job. Nice work!

ToothlessGear commented 10 years ago

Thank you, going to push to npm later today!