Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apn - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

4

ChangeLog.md
## Changelog
1.3.4:
* Fixed #101: TypeError: Cannot call method 'resolve' of null
1.3.3:

@@ -4,0 +8,0 @@

23

lib/connection.js

@@ -82,2 +82,4 @@ var Errors = require('./errors');

this.socketId = 0;
events.EventEmitter.call(this);

@@ -226,2 +228,3 @@ }

this.connect().then(function () {
this.socket.socketId = this.socketId++;
this.socket.currentId = 0;

@@ -291,5 +294,11 @@ this.socket.cachedNotifications = [];

Connection.prototype.errorOccurred = function(socket, err) {
debug("Socket error occurred", err);
debug("Socket error occurred", socket.socketId, err);
if(socket.transmissionErrorOccurred && err.code == 'EPIPE') {
debug("EPIPE occurred after a transmission error which we can ignore");
return;
}
this.emit('socketError', err);
if(this.deferredConnection && this.deferredConnection.promise.isPending()) {
if(this.socket == socket && this.deferredConnection && this.deferredConnection.promise.isPending()) {
this.deferredConnection.reject(err);

@@ -317,3 +326,3 @@ }

Connection.prototype.socketDrained = function(socket, serviceBuffer) {
debug("Socket drained");
debug("Socket drained", socket.socketId);
socket.busy = false;

@@ -344,3 +353,3 @@ if(this.options.enhanced) {

Connection.prototype.socketTimeout = function(socket) {
debug("Socket timeout");
debug("Socket timeout", socket.socketId);
this.emit('timeout');

@@ -354,3 +363,3 @@ socket.end();

Connection.prototype.destroyConnection = function(socket) {
debug("Destroying connection");
debug("Destroying connection", socket.socketId);
if (socket) {

@@ -365,3 +374,3 @@ socket.destroy();

Connection.prototype.socketClosed = function(socket) {
debug("Socket closed");
debug("Socket closed", socket.socketId);

@@ -459,2 +468,4 @@ if (socket === this.socket && !this.deferredConnection.promise.isPending()) {

}
socket.transmissionErrorOccurred = true;
}

@@ -461,0 +472,0 @@ };

@@ -16,2 +16,3 @@ /**

'invalidToken': 8,
'apnsShutdown': 10,
'none': 255

@@ -18,0 +19,0 @@ };

{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "1.3.3",
"version": "1.3.4",
"author": "Andrew Naylor <argon@mkbot.net>",

@@ -6,0 +6,0 @@ "contributors": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc