Closed KATT closed 9 years ago
Can you give some more details on when this happens? What code did you run? What was the exact output?
The issue actually didn't end up being in node-gcm, but I'm gonna do a PR with a small change.
From: sender.js#L102-L107
try {
callback(null, JSON.parse(resBody));
} catch (e) {
debug("Error handling GCM response " + e);
callback("error", null);
}
I had an exception being thrown in my callback
of send
which ended up causing a loop of retries and the callback ended up getting called, then throwing an error, then getting called again, then throwing an error .. until retryCount was reached.
PR coming up to take the callback
out of the try
/catch
.
Great catch! This is obviously a problem :)
Because of retry count (most likely) the callback when using
send()
is called multiple times.