When using the same instance of GCM to .send() in parallel, you'll only get one message id (or one error), since the function was relying on a single EventEmitter for all calls.
This PR makes the library works in parallel.
To maintain backward compatibility, I kept the .emit() behavior, even though the library itself isn't using it anymore.
When using the same instance of GCM to
.send()
in parallel, you'll only get one message id (or one error), since the function was relying on a single EventEmitter for all calls.This PR makes the library works in parallel.
To maintain backward compatibility, I kept the
.emit()
behavior, even though the library itself isn't using it anymore.